application-services icon indicating copy to clipboard operation
application-services copied to clipboard

fix(build): set target_arch to fix NSS build on Apple Silicon

Open groovecoder opened this issue 8 months ago • 0 comments

GYP expects the target_arch environment variable to determine the correct architecture when building NSS. On Apple Silicon, if this is unset or misconfigured, NSS can be built for x86_64, leading to linker failures due to architecture mismatch.

This patch sets target_arch based on uname -m when building on macOS, ensuring correct architecture selection and avoiding these build errors.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • [x] This PR follows the breaking change policy:
      • This PR has no breaking API changes
  • [ ] Quality: This PR builds and tests run cleanly
    • Note:
      • ~For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.~
      • ~If this pull request includes a breaking change, consider cutting a new release after merging.~
    • I'm getting these test failures, but they seem unrelated to this change:
failures:
    selector::tests::test_filter_with_remote_settings
    selector::tests::test_filter_with_remote_settings_overrides
    selector::tests::test_remote_settings_empty_search_config_overrides_filtered_without_error
    selector::tests::test_remote_settings_empty_search_config_records_throws_error
    selector::tests::test_remote_settings_search_config_overrides_records_is_none_throws_error

test result: FAILED. 40 passed; 5 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
  • [ ] Tests: This PR includes thorough tests or an explanation of why it does not
    • I'm not sure how to add a test for this?
  • [x] Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • ~Any breaking changes to Swift or Kotlin binding APIs are noted explicitly~
  • [x] ~Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.~

Branch builds: add [firefox-android: branch-name] to the PR title.

groovecoder avatar Apr 18 '25 11:04 groovecoder