-
-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GCC's ability to find the precompiled header #1268
Conversation
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice find! So the last versions had slower compile times with g++?
Yes, and I guess it slipped under the radar |
Submisison Checklist
./runCmdStanTests.py src/test
Summary:
In #1171 we added the version of the C++ compiler to the precompiled header file name. This works for clang, since we have to explicitly pass
-include-pch path/to/header
, but GCC does an implicit lookup. Since the filename didn't match, it failed.This paragraph in the GCC manual saves us, though:
So we just use that folder instead. Clang still won't care, since we're giving it the path explicitly, but gcc compile times are now back to what you'd expect.
Intended Effect:
How to Verify:
Compile with
PRECOMPILED_HEADERS=false
and then with them enabled, compare timings.Side Effects:
Documentation:
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: