Index: test/wasm/responsefile.test =================================================================== --- /dev/null +++ test/wasm/responsefile.test @@ -0,0 +1,11 @@ +RUN: llc -filetype=obj -o %t.o %p/Inputs/ret32.ll + +RUN: echo -o %t.wasm -e ret32 %t.o > %t.rsp +RUN: wasm-ld @%t.rsp --initial-memory=655360 +RUN: llvm-readobj --sections %t.wasm | FileCheck %s +CHECK: InitialPages: 10 + +RUN: echo "blah\foo" > %t.rsp +RUN: not wasm-ld @%t.rsp 2>&1 | \ +RUN: FileCheck --check-prefix=ESCAPE %s +ESCAPE: error: cannot open blahfoo: No such file or directory Index: wasm/Driver.cpp =================================================================== --- wasm/Driver.cpp +++ wasm/Driver.cpp @@ -142,6 +142,10 @@ unsigned MissingIndex; unsigned MissingCount; + + // Expand response files (arguments in the form of @) + cl::ExpandResponseFiles(Saver, cl::TokenizeGNUCommandLine, Vec); + opt::InputArgList Args = this->ParseArgs(Vec, MissingIndex, MissingCount); handleColorDiagnostics(Args);