Skip to content

Comments

swift: don't pass -march to swiftc#296082

Merged
1 commit merged intomasterfrom
unknown repository
Mar 17, 2024
Merged

swift: don't pass -march to swiftc#296082
1 commit merged intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Mar 15, 2024

Description of changes

adds an argument to cc-wrapper to disable setting -march.
fix #295322

no rebuild for x64 linux or darwin. aarch64 darwin build now succeeds.

https://hydra.nixos.org/build/253076388
https://hydra.nixos.org/build/253181970

Things done

  • Built on platform(s)
    • x86_64-linux (no build -- cached)
    • aarch64-linux
    • x86_64-darwin (no build -- cached)
    • aarch64-darwin (built)
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Mar 15, 2024
@ghost ghost marked this pull request as ready for review March 15, 2024 06:56
@ghost ghost marked this pull request as draft March 15, 2024 07:09
@ghost ghost marked this pull request as ready for review March 15, 2024 07:15
@ghost ghost changed the title swift: don't pass -march to clang swift: don't pass -march to swiftc Mar 15, 2024
@ghost
Copy link
Author

ghost commented Mar 15, 2024

@ofborg build swiftPackages.swift-unwrapped swiftPackages.Dispatch

@ghost ghost marked this pull request as draft March 16, 2024 09:12
swiftc uses cc-wrapper which sets the -march flag on some systems which
breaks the build. This change adds a flag, disableMarch, to cc-wrapper
which disables using the -march flag.
#295322
@ghost ghost marked this pull request as ready for review March 16, 2024 11:03
@ghost
Copy link
Author

ghost commented Mar 16, 2024

@ghost ghost mentioned this pull request Mar 16, 2024
13 tasks
@ghost ghost merged commit 8c421f7 into NixOS:master Mar 17, 2024
@ghost ghost deleted the dont-pass-march-swift branch March 17, 2024 02:18
YorikSar added a commit to YorikSar/nixpkgs that referenced this pull request Mar 18, 2024
Use the same stdenv and clang as part of it as Swift uses. Leverages
workaround from NixOS#296082 for
the issue NixOS#295322.
@YorikSar
Copy link
Contributor

Note that this needs to be propagated to downstream packages using Swift, for example #296878.

@ghost
Copy link
Author

ghost commented Mar 18, 2024

Note that this needs to be propagated to downstream packages using Swift, for example #296878.

that's not good. so this change fixed the swift build but all downstream packages are still broken. will need to find a better solution.

@ghost ghost mentioned this pull request Mar 18, 2024
@Samasaur1 Samasaur1 mentioned this pull request Apr 3, 2024
13 tasks
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build failure: swift for aarch64

2 participants