The Driver only checked if nostdlib was set when deciding to add
reserved_lib_stdcxx, but as nostdlib is always exactly nodefaultlibs and
nostartfiles we should be checking one (clearly nodefaultlibs in the
case) as well. This appears to be the only such instance of this in the
codebase.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The commit message could use some work: please summarize what you're actually changing, and why. (Here you mention only vaguely why, and not what.)
test/Driver/nodefaultlib_stdc.c | ||
---|---|---|
1 ↗ | (On Diff #40976) | It's typically preferred to put a test in the same file as related tests -- so, merge nodefaultlib_stdc.c into the nodefaultlib.c file. You can do this without having the assertion lines conflict with each-other by using the "--check-prefix" argument to FileCheck. This test doesn't specify a target, and thus will run for whatever the default compiled-in target is for each user's clang. Might want to specify a target explicitly to avoid that. Maybe this test actually works for all targets, anyways, but it's probably safer to just specify one. :) |