Commit 5a90df8
committed
[compiler-rt][NFC] Apply -nostdinc++ only to C++ source in profile runtime
Avoid passing the C++-specific `-nostdinc++` flag to C source files in
the profile runtime library, which triggers warnings when building with GCC:
cc1: warning: command-line option ‘-nostdinc++’ is valid for C++/ObjC++ but not for C
We only need `-nostdinc++` for `InstrProfilingRuntime.cpp` to prevent accidental
inclusion of the C++ standard library headers. This patch scopes the flag to
that file using `set_properties()` and removes the flag from
the global `EXTRA_FLAGS`.1 parent 09984be commit 5a90df8
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
| |||
0 commit comments