Bug: ProcessCcArgs
mis-processes arguments containing -fdebug-prefix-map
#3065
Labels
bug
Something isn't working
Description
In
ProcessCcArgs
, when a-fdebug-prefix-map
argument is detected, it is skipped, and the next argument is incorrectly also skipped.-fdebug-prefix-map
does not take an additional argument, correct usage is something like-fdebug-prefix-map=a=b
to mapa
tob
. clang will not accept something like-fdebug-prefix-map a=b
, so we should never skip the argument after-fdebug-prefix-map
.This will cause the arguments to get corrupted, in my case, an
-iquote
was getting skipped, causing the directory I included to be sent to the compiler as a compiler input file. This meant xcode got invalid command lines, making the "Indexing" step not succeed.Code link.
Reproduction steps
In a
cc_library
, addThen,
bazel run //:xcodeproj
, and open a source file in the modified library. The file will fail in the "Indexing" step since.
will be passed as a compiler input (i.e., theiquote
argument will not be provided to xcode)Expected behavior
We expect
-fdebug-prefix-m=a=b
to be removed from the argument list, but no further arguments should be removed.rules_xcodeproj version
8ba39d7
Xcode version
15.4
Bazel version
7.2.1
rules_apple version
No response
rules_swift version
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: