Skip to content

gcc: Force local compilation on dist-client when assembler has .incbin#2703

Closed
lissyx wants to merge 1 commit into
mozilla:mainfrom
lissyx:issue2700_incbin_sccache_dist
Closed

gcc: Force local compilation on dist-client when assembler has .incbin#2703
lissyx wants to merge 1 commit into
mozilla:mainfrom
lissyx:issue2700_incbin_sccache_dist

Conversation

@lissyx
Copy link
Copy Markdown
Collaborator

@lissyx lissyx commented May 11, 2026

Assembly files with .incbin would trigger a build failure when running over sccache-dist:

0:03.40 E /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S:28:9: error: Could not find incbin file '/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat'

Force disable distributed compilation when hitting such a file.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 11, 2026

Codecov Report

❌ Patch coverage is 98.64865% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.35%. Comparing base (c0db872) to head (b02b310).

Files with missing lines Patch % Lines
src/compiler/gcc.rs 98.64% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2703   +/-   ##
=======================================
  Coverage   74.34%   74.35%           
=======================================
  Files          70       70           
  Lines       39373    39389   +16     
=======================================
+ Hits        29271    29286   +15     
- Misses      10102    10103    +1     

☔ View full report in Codecov by Sentry.
📢 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.

Assembly files with .incbin would trigger a build failure when running
over sccache-dist:
> 0:03.40 E /home/alex/firefox/gecko-cinnabar/config/external/icu/data/icu_data.S:28:9: error: Could not find incbin file '/home/alex/firefox/gecko-cinnabar/config/external/icu/data/icudt78l.dat'

Force disable distributed compilation when hitting such a file.
@lissyx lissyx force-pushed the issue2700_incbin_sccache_dist branch from bfba315 to b02b310 Compare May 11, 2026 06:38
Comment thread src/compiler/gcc.rs

#[cfg(feature = "dist-client")]
let assembler_has_incbin = match Language::from_file_name(parsed_args.input.clone().as_path()) {
Some(Language::AssemblerToPreprocess) => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be checked for any assembly or C language, because the last one may contain inline ASM with that directive and the same problem

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it's going to be a lot of useless IOs reading those content then?

Comment thread src/compiler/gcc.rs
let assembler_has_incbin = match Language::from_file_name(parsed_args.input.clone().as_path()) {
Some(Language::AssemblerToPreprocess) => {
let mut contents = String::new();
let res = File::open(parsed_args.input.clone())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we cannot just use the source file - we must check the preprocessor output - the .incbin directive may come from the included header file

@AJIOB
Copy link
Copy Markdown
Contributor

AJIOB commented May 11, 2026

One more question about your original issue: can you use relative path as an .incbin input? Does it solve your problem?

P.S. The problem looks like the same we have with an #include "/some/absolute/path" directive

@lissyx lissyx closed this May 11, 2026
@lissyx lissyx deleted the issue2700_incbin_sccache_dist branch May 11, 2026 07:01
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.

3 participants