Skip to content

clang: cache compiles that pass -fopenmp through -Xclang - #3062

Merged
sylvestre merged 1 commit into
mozilla:mainfrom
puretechteam:fix/xclang-fopenmp-2522
Nov 24, 2026
Merged

sylvestre merged 1 commit into
mozilla:mainfrom
puretechteam:fix/xclang-fopenmp-2522

Conversation

@puretechteam

Copy link
Copy Markdown
Contributor

Fixes #2522

Apple clang's driver rejects -fopenmp, so CMake's FindOpenMP passes it to the frontend as
-Xclang -fopenmp. sccache only caches -Xclang arguments that the clang table knows, so these
compiles were never cached ("Can't handle UnknownFlag arguments with -Xclang"). -fopenmp is now
a pass-through flag and stays in the hashed common args, through -Xclang and on its own.
Flags are matched exactly, so -fopenmp=libomp and -fopenmp-simd are unaffected.

test_parse_xclang_fopenmp fails without the change with the error from the issue.
On Windows, cargo test --locked --lib --bins --tests runs 725 tests on main and 726 with this
change, all passing apart from server::tests::ipc_* tests that sometimes fail here with
"os error 10054", on main too (2 of 5 --lib runs). I have not run it on macOS with Apple clang.

@codecov-commenter

codecov-commenter commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.99%. Comparing base (0e8f184) to head (8ee59ef).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3062   +/-   ##
=======================================
  Coverage   79.99%   79.99%           
=======================================
  Files          76       76           
  Lines       47373    47379    +6     
=======================================
+ Hits        37894    37900    +6     
  Misses       9479     9479           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sylvestre
sylvestre merged commit 025726a into mozilla:main Nov 24, 2026
51 checks passed
@sylvestre

Copy link
Copy Markdown
Collaborator

Thanks for your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

-Xclang -fopenmp errors with UnknownFlag.

3 participants