Closed
Bug 1242004
Opened 8 years ago
Closed 8 years ago
Skip -Xclang arguments when generating clang compilation database or YouCompleteMe config
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox47 fixed)
RESOLVED
FIXED
mozilla47
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: ehsan.akhgari, Unassigned)
Details
Attachments
(1 file)
3.27 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
clang based tools typically choke when they encounter a lot of -XClang arguments, and since those args are passed to the cc1 driver they're unnecessary for such tools anyways. This helps people who have things like --enable-clang-plugin in their mozconfig use clang based tools without having to remove these arguments manually.
Reporter | ||
Comment 1•8 years ago
|
||
Attachment #8711137 -
Flags: review?(nfroyd)
Comment 2•8 years ago
|
||
Comment on attachment 8711137 [details] [diff] [review] Skip -Xclang arguments when generating clang compilation database or YouCompleteMe config Review of attachment 8711137 [details] [diff] [review]: ----------------------------------------------------------------- r=me with the below fixed. you++ for the commit message! ::: python/mozbuild/mozbuild/compilation/util.py @@ +35,5 @@ > return build_vars > + > +def sanitize_cflags(flags): > + # We filter out -Xclang arguments as clang based tools typically choke on > + # passing these flags down to the clang driver. I think it is slightly clearer to say: "We filter out -Xclang ARG sequences as clang-based tools..." The use of |saw_xclang| below was not immediately obvious here, since the comment wording suggested to me we are only filtering -Xclang, not the argument to -Xclang. Inept reviewer? Possibly! ;)
Attachment #8711137 -
Flags: review?(nfroyd) → review+
Reporter | ||
Comment 3•8 years ago
|
||
Will do! (FWIW, -Xclang just tells the clang driver driver to pass whatever comes after it to clang cc1. For example, this: clang -cc1 -foo -bar -baz needs to be expressed as: clang -Xclang -foo -Xclang -bar -Xclang -baz when invoking the driver driver. I'll mention this in the comment to make it super clear.)
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4d997a1ef360
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Updated•8 years ago
|
Target Milestone: mozilla46 → mozilla47
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•