Skip to content

Commit

Permalink
Only add wrapped archflags if not already present.
Browse files Browse the repository at this point in the history
meson-python does not like duplicate ARCHFLAGS values, and will error
with output such as:

```
('\x1b[31m',)meson-python: error: Multi-architecture builds are not
supported but $ARCHFLAGS='-arch x86_64 -arch x86_64'
[end of output]
```

https://github.com/nipy/nipy-wheels/actions/runs/6805528295/job/18505232990#step:4:164
at time of writing.
  • Loading branch information
matthew-brett committed Nov 9, 2023
1 parent 452dd2d commit a660522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osx_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ function macos_intel_native_build_setup {
export _PYTHON_HOST_PLATFORM="macosx-${MB_PYTHON_OSX_VER}-x86_64"
export CFLAGS+=" -arch x86_64"
export CXXFLAGS+=" -arch x86_64"
export ARCHFLAGS+=" -arch x86_64"
[[ $ARCHFLAGS =~ "-arch x86_64" ]] || export ARCHFLAGS+=" -arch x86_64"
export CPPFLAGS+=" -arch x86_64"
export LDFLAGS+=" -arch x86_64"
}
Expand All @@ -487,7 +487,7 @@ function macos_arm64_cross_build_setup {
export CFLAGS+=" -arch arm64"
export CXXFLAGS+=" -arch arm64"
export CPPFLAGS+=" -arch arm64"
export ARCHFLAGS+=" -arch arm64"
[[ $ARCHFLAGS =~ "-arch arm64" ]] || export ARCHFLAGS+=" -arch arm64"
export FCFLAGS+=" -arch arm64"
export FC=$FC_ARM64
export F90=${F90_ARM64:-${FC}}
Expand Down

0 comments on commit a660522

Please sign in to comment.