diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index ac06dd814855..31eed5d7a86c 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -422,6 +422,7 @@ void LinkerDriver::createFiles(opt::InputArgList &Args) { case OPT_l: addLibrary(Arg->getValue()); break; + case OPT_alias_script_T: case OPT_INPUT: case OPT_script: addFile(Arg->getValue()); diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp index b1184620eadb..b4c41580b47a 100644 --- a/lld/ELF/DriverUtils.cpp +++ b/lld/ELF/DriverUtils.cpp @@ -217,6 +217,7 @@ std::string elf::createResponseFile(const opt::InputArgList &Args) { case OPT_L: case OPT_dynamic_list: case OPT_rpath: + case OPT_alias_script_T: case OPT_script: case OPT_version_script: OS << Arg->getSpelling() << " " diff --git a/lld/test/ELF/reproduce.s b/lld/test/ELF/reproduce.s index 116c02fa4fcc..811c6cf76854 100644 --- a/lld/test/ELF/reproduce.s +++ b/lld/test/ELF/reproduce.s @@ -29,8 +29,9 @@ # RUN: echo "{ local: *; };" > ver # RUN: echo > dyn # RUN: echo > file +# RUN: echo > file2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o 'foo bar' -# RUN: ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile \ +# RUN: ld.lld --reproduce repro2 'foo bar' -L"foo bar" -Lfile -Tfile2 \ # RUN: --dynamic-list dyn -rpath file --script file --version-script ver \ # RUN: --dynamic-linker "some unusual/path" -soname 'foo bar' -soname='foo bar' # RUN: cpio -id < repro2.cpio @@ -38,6 +39,7 @@ # RSP2: "{{.*}}foo bar" # RSP2-NEXT: -L "{{.*}}foo bar" # RSP2-NEXT: -L {{.+}}file +# RSP2-NEXT: --script {{.+}}file2 # RSP2-NEXT: --dynamic-list {{.+}}dyn # RSP2-NEXT: -rpath {{.+}}file # RSP2-NEXT: --script {{.+}}file