Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
5924b59c
Commit
5924b59c
authored
Jan 23, 2021
by
Isuru Fernando
Browse files
Merge branch 'devel' of github.com:matthew-brett/multibuild into master
parents
dcf9ab43
0d93db54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
14 deletions
+12
-14
README.rst
README.rst
+1
-1
common_utils.sh
common_utils.sh
+1
-1
configure_build.sh
configure_build.sh
+1
-1
osx_utils.sh
osx_utils.sh
+9
-11
No files found.
README.rst
View file @
5924b59c
...
...
@@ -444,7 +444,7 @@ To use these scripts
not be identical which is required when building the wheel as a ``universal2``
wheel. If you are using Fortran, ``gfortran`` doesn't support fat binaries.
2. Build ``arm64`` and ``x86_64`` wheels sep
e
rately and fuse them.
2. Build ``arm64`` and ``x86_64`` wheels sep
a
rately and fuse them.
For this to work, we need to build the C/C++ libraries twice. Therefore,
the library building is once called with ``BUILD_PREFIX=${BUILD_PREFIX:-/usr/local}``
for ``x86_64`` and then called again with ``BUILD_PREFIX=/opt/arm64-builds``.
...
...
common_utils.sh
View file @
5924b59c
...
...
@@ -271,7 +271,7 @@ function bdist_wheel_cmd {
}
function wrap_wheel_builder {
# Wrapper for build command, overwritten by macOS for universal2 wheel building
# Wrapper for build command
s
, overwritten by macOS for universal2
or arm64
wheel building
$@
}
...
...
configure_build.sh
View file @
5924b59c
...
...
@@ -27,7 +27,7 @@ if [ -n "$IS_MACOS" ]; then
# Do nothing as we are going with fusing wheels
ARCH_FLAGS
=
${
ARCH_FLAGS
:-}
else
echo
"
i
nvalid platform = '
$PLAT
'
, s
upported values are 'intel'
or
'x86_64'
or
'arm64' or 'universal2'"
echo
"
I
nvalid platform = '
$PLAT
'
. S
upported values are 'intel'
,
'x86_64'
,
'arm64' or 'universal2'"
exit
1
fi
# Only set CFLAGS, FFLAGS if they are not already defined. Build functions
...
...
osx_utils.sh
View file @
5924b59c
...
...
@@ -424,8 +424,8 @@ function activate_ccache {
echo
"Using C compiler:
$(
which clang
)
"
}
function
macos_intel_build_
wra
p
{
#
Wra
p build for single arch x86_64 wheels
function
macos_intel_build_
setu
p
{
#
Setu
p build for single arch x86_64 wheels
export
PLAT
=
"x86_64"
export
_PYTHON_HOST_PLATFORM
=
"macosx-
${
MB_PYTHON_OSX_VER
}
-x86_64"
export
CFLAGS+
=
" -arch x86_64"
...
...
@@ -433,11 +433,10 @@ function macos_intel_build_wrap {
export
ARCHFLAGS+
=
" -arch x86_64"
export
CPPFLAGS+
=
" -arch x86_64"
export
LDFLAGS+
=
" -arch x86_64"
$@
}
function
macos_arm64_build_
wra
p
{
#
Wra
p build for single arch arm_64 wheels
function
macos_arm64_build_
setu
p
{
#
Setu
p build for single arch arm_64 wheels
export
PLAT
=
"arm64"
export
BUILD_PREFIX
=
/opt/arm64-builds
sudo mkdir
-p
$BUILD_PREFIX
...
...
@@ -455,7 +454,6 @@ function macos_arm64_build_wrap {
export
LDFLAGS+
=
" -arch arm64 -L
$BUILD_PREFIX
/lib -Wl,-rpath,
$BUILD_PREFIX
/lib
${
FC_ARM64_LDFLAGS
:-}
"
# This would automatically let autoconf know that we are cross compiling for arm64 darwin
export
host_alias
=
"aarch64-apple-darwin20.0.0"
$@
}
function
fuse_macos_intel_arm64
{
...
...
@@ -479,12 +477,12 @@ function fuse_macos_intel_arm64 {
function
wrap_wheel_builder
{
if
[[
"
${
PLAT
:-}
"
==
"universal2"
]]
;
then
(
macos_intel_build_
wrap
$@
)
(
macos_intel_build_
setup
&&
$@
)
rm
-rf
*
-stamp
(
macos_arm64_build_
wrap
$@
)
fuse_macos_intel_arm64
$@
elif
[[
"
${
PLAT
:-}
"
==
"arm64"
&&
"
$
(
uname
-m
)
"
!=
"arm64"
]]
;
then
(
macos_arm64_build_
wrap
$@
)
(
macos_arm64_build_
setup
&&
$@
)
fuse_macos_intel_arm64
elif
[[
"
${
PLAT
:-}
"
==
"arm64"
&&
"(uname -m)"
!=
"arm64"
]]
;
then
(
macos_arm64_build_
setup
&&
$@
)
else
$@
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment