Skip to content

Classify .s files as AssemblerToPreprocess so #include/#ifdef are honored#2692

Merged
sylvestre merged 1 commit intomozilla:mainfrom
sylvestre:asm-include
May 3, 2026
Merged

Classify .s files as AssemblerToPreprocess so #include/#ifdef are honored#2692
sylvestre merged 1 commit intomozilla:mainfrom
sylvestre:asm-include

Conversation

@sylvestre
Copy link
Copy Markdown
Collaborator

a previous change broke firefox with:


[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/security'
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang -isysroot /builds/worker/fetches/MacOSX26.4.sdk -mmacosx-version-min=10.15 --target=x86_64-apple-darwin -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstrict-flex-arrays=1 -pthread -ffunction-sections -fdata-sections -fno-math-errno -fPIC -fcrash-diagnostics-dir=/builds/worker/artifacts -gdwarf-4 -gsimple-template-names -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror  -o ../dist/bin/libnss3.dylib -Wl,@/builds/worker/workspace/obj-build/security/libnss3_dylib.list    -fuse-ld=lld -fstack-protector-strong -Wl,-dead_strip   ../dist/bin/libmozglue.dylib -Wl,-exported_symbols_list,libnss3.dylib.symbols -dynamiclib -install_name @rpath/libnss3.dylib -compatibility_version 1 -current_version 1  -framework CoreServices
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/security'
[task 2026-05-02T19:11:38.257+00:00] 19:11:38    ERROR -  ld64.lld: error: undefined symbol: _PR_Darwin_x86_64_AtomicIncrement
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>> referenced by pratom.c:245 (./../../../../../../checkouts/gecko/nsprpub/pr/src/misc/pratom.c:245)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>>               ../config/external/nspr/pr/Unified_c_external_nspr_pr1.o:(symbol PR_AtomicIncrement+0x6)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38    ERROR -  ld64.lld: error: undefined symbol: _PR_Darwin_x86_64_AtomicDecrement
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>> referenced by pratom.c:248 (./../../../../../../checkouts/gecko/nsprpub/pr/src/misc/pratom.c:248)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>>               ../config/external/nspr/pr/Unified_c_external_nspr_pr1.o:(symbol PR_AtomicDecrement+0x6)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38    ERROR -  ld64.lld: error: undefined symbol: _PR_Darwin_x86_64_AtomicSet
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>> referenced by pratom.c:252 (./../../../../../../checkouts/gecko/nsprpub/pr/src/misc/pratom.c:252)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>>               ../config/external/nspr/pr/Unified_c_external_nspr_pr1.o:(symbol PR_AtomicSet+0x6)
[task 2026-05-02T19:11:38.257+00:00] 19:11:38    ERROR -  ld64.lld: error: undefined symbol: _PR_Darwin_x86_64_AtomicAdd
[task 2026-05-02T19:11:38.257+00:00] 19:11:38     INFO -  >>> referenced by pratom.c:256 (./../../../../../../checkouts/gecko/nsprpub/pr/src/misc/pratom.c:256)
[task 2026-05-02T19:11:38.258+00:00] 19:11:38     INFO -  >>>               ../config/external/nspr/pr/Unified_c_external_nspr_pr1.o:(symbol PR_AtomicAdd+0x6)
[task 2026-05-02T19:11:38.258+00:00] 19:11:38    ERROR -  clang: error: linker command failed with exit code 1 (use -v to see invocation)

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.26%. Comparing base (6f7e664) to head (ca88731).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2692      +/-   ##
==========================================
- Coverage   74.27%   74.26%   -0.01%     
==========================================
  Files          70       70              
  Lines       39325    39333       +8     
==========================================
+ Hits        29208    29211       +3     
- Misses      10117    10122       +5     

☔ 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.

@sylvestre sylvestre marked this pull request as ready for review May 3, 2026 19:47
@sylvestre sylvestre merged commit c76f766 into mozilla:main May 3, 2026
52 checks passed
@sylvestre sylvestre deleted the asm-include branch May 3, 2026 19:55
@AJIOB
Copy link
Copy Markdown
Contributor

AJIOB commented May 4, 2026

JFYI, looks like it's an implementation bug of the build system. Or we ignore something else, such as force switching language if it passed by command-line.

Pure GCC & clang calls doesn't preprocess pure .s files & it generates some another bugs, such as #2664, which is fixed by #2665.

We can precisely check in via e-mail or chatting if you want.

@sylvestre
Copy link
Copy Markdown
Collaborator Author

ok, thanks :)

what do you think we should do? :)

@AJIOB
Copy link
Copy Markdown
Contributor

AJIOB commented May 4, 2026

IMO, you should manually override the language for that files in your build system, such as pass the -x assembler-with-cpp from https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html to the compiler

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