Closed
Bug 1281968
Opened 8 years ago
Closed 8 years ago
YouCompleteMe not seeing language version flags
Categories
(Firefox Build System :: Mach Core, enhancement)
Firefox Build System
Mach Core
Tracking
(firefox50 fixed)
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: rillian, Assigned: ehsan.akhgari)
Details
Attachments
(1 file, 1 obsolete file)
1.21 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
Today I noticed Ycm was marking up C++11-only features in my source files, like the `auto` keyword and `F foo = {a, b, c}` struct initializers. We generally build with `-std=gnu++11` but it looks like .ycm_extra_conf.py isn't getting this flag from mach.
Reporter | ||
Comment 1•8 years ago
|
||
Here's a work-around patch, just forcing the flag unconditionally. Presumedly this breaks Ycm on non-C++ source files. Ehsan, and idea what's going on here?
Attachment #8764789 -
Flags: feedback?(ehsan)
Assignee | ||
Comment 2•8 years ago
|
||
So sorry for the long delay here, I was on vacation/sick... So the way that this works is .ycm_extra_conf.py calls |./mach compileflags path/to/file.cpp| which in turn runs |make -C objdir/path/to showbuild|. Running the showbuild target manually, I get: CC = /Users/ehsan/Downloads/clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang -std=gnu99 CXX = /Users/ehsan/Downloads/clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang++ -std=gnu++11 CCC = /Users/ehsan/Downloads/clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang++ -std=gnu++11 CPP = /Users/ehsan/Downloads/clang+llvm-3.7.0-x86_64-apple-darwin/bin/clang -std=gnu99 -E ... Note how the -std flags are specified in CXX and not CXXFLAGS!
Assignee: nobody → ehsan
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8774812 -
Flags: review?(gps)
Assignee | ||
Comment 4•8 years ago
|
||
Comment on attachment 8764789 [details] [diff] [review] Workaround My patch fixes this more properly.
Attachment #8764789 -
Attachment is obsolete: true
Attachment #8764789 -
Flags: feedback?(ehsan)
Updated•8 years ago
|
Attachment #8774812 -
Flags: review?(gps) → review+
Pushed by eakhgari@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0a1c5b06f3da Include the flags passed through CC/CXX in ./mach compileflags; r=gps
Comment 6•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/0a1c5b06f3da
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Reporter | ||
Comment 7•8 years ago
|
||
Thanks ehsan!
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
•