-
Notifications
You must be signed in to change notification settings - Fork 53
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
Improve consistency between CC and CMake builds #525
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #525 +/- ##
==========================================
- Coverage 95.80% 92.52% -3.28%
==========================================
Files 61 67 +6
Lines 8143 9277 +1134
Branches 0 9277 +9277
==========================================
+ Hits 7801 8584 +783
- Misses 342 422 +80
- Partials 0 271 +271 ☔ View full report in Codecov by Sentry. |
94e174c
to
c2d7c14
Compare
f5aa492
to
edee779
Compare
535b712
to
9e6ad38
Compare
c8a982d
to
44f4793
Compare
1d55237
to
eb69105
Compare
eb69105
to
ac66bda
Compare
else | ||
exit 1; # FAIL - we expected to find "runner" (i.e., a path) | ||
fi | ||
- if: ${{ matrix.gcc_version == '8' }} |
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.
Is there a reason why we check this specific version?
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.
The -ffile-prefix-map
option (which can strip build environment paths from the resulting binary) is only supported on GCC v8 and later. Our use of this flags was causing failures for projects building with CMake and an older GCC compiler.
This tests verifies that the path where the build is being performed (which is under the "runner"s home directory) is not found in the release binary.
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.
Ah that makes sense, I didn't realize this test dimension was intertwined with the flag. A comment here might help since the knowledge is a bit specific, but not absolutely required.
ac66bda
to
0e968e3
Compare
0e968e3
to
b0d6e7e
Compare
else | ||
exit 1; # FAIL - we expected to find "runner" (i.e., a path) | ||
fi | ||
- if: ${{ matrix.gcc_version == '8' }} |
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.
Ah that makes sense, I didn't realize this test dimension was intertwined with the flag. A comment here might help since the knowledge is a bit specific, but not absolutely required.
Description of changes:
The "CMake builder" now defers to the "CC builder" logic to determine which flags are appropriate for the compiler in the build environment. (Restores the usage of
-ffile-prefix-map
compiler option with CMake build, which had been disabled in a previous PR.)Testing
Tested with GCC 7.2
Tested on MacOS (aarch64)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.