aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2024-12-17 11:30:13 -0500
committerGitHub <noreply@github.com>2024-12-17 11:30:13 -0500
commit34a44b20888479cf934014e3aa85c563725df69a (patch)
tree541d2ee6f8f2f6db80531fb1a4267789b2d6fc86 /flang/lib/Frontend/CompilerInvocation.cpp
parent7ab8dd7c31c9a595b183aa857bb3536be01f350d (diff)
downloadllvm-34a44b20888479cf934014e3aa85c563725df69a.zip
llvm-34a44b20888479cf934014e3aa85c563725df69a.tar.gz
llvm-34a44b20888479cf934014e3aa85c563725df69a.tar.bz2
[lld/COFF] Handle -start-lib / -end-lib better in /reproduce: output (#119752)
Previously, we'd collect all input files in Driver::filePaths, and then write filePaths after all other flags in createResponseFile(). This meant that `-start-lib foo.obj -end-lib` would be written as `-start-lib -end-lib foo.obj`, changing semantics. Instead, remove Driver::filePaths, and handle things that fed into it directly: * OPT_INPUT is now handled in the same way as other flags, so that we now get `-start-lib foo.obj -end-lib` in response.txt as desired. Add a test for -start-lib / -end-lib and /reproduce:. * OPT_wholearchive_file needs explicit handling now -- but before, this was buggy as well: We'd put the flag without a rewritten path in response.txt, but also the rewritten input file without wholearchive semantics via filePaths. So this commit makes --whole-archive work with /reproduce: too, and adds test coverage. * /defaultlib:foo is now written as /defaultlib:foo into response.txt, instead of writing the resolved path previously. While response.txt looks slightly differently, both should have the same semantics, and this should be mostly a no-op. (It does require updating a test.) * /defaultlib: from .drectve sections are no longer recorded in response.txt. This seems like a progression -- in the non-repro case they come from .obj files, so they should come (only) from there in the repro case too. This adds test coverage for this case. Makes createResponseFile() look more like the versions in the ELF and MachO ports too.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions