-
-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Universal macOS Library (#625)
* cross-compiling on M1 mac * disable NEON on Intel mac * add CMAKE_SYSTEM_ARCHITECTURES
- Loading branch information
Showing
6 changed files
with
143 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/lib/transitions.bzl b/lib/transitions.bzl | ||
index f07e628..1e48a26 100644 | ||
--- a/lib/transitions.bzl | ||
+++ b/lib/transitions.bzl | ||
@@ -18,7 +18,7 @@ def _macos_universal_transition_impl(settings, _attr): | ||
# Create a split transition from any macOS cpu to a list of all macOS cpus | ||
if settings["//command_line_option:cpu"].startswith("darwin"): | ||
return [ | ||
- {"//command_line_option:cpu": "darwin_x86_64"}, | ||
+ {"//command_line_option:cpu": "darwin"}, | ||
{"//command_line_option:cpu": "darwin_arm64"}, | ||
] | ||
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/3rdparty/libpng/CMakeLists.txt b/3rdparty/libpng/CMakeLists.txt | ||
index efa59627eb..b1c18805ff 100644 | ||
--- a/3rdparty/libpng/CMakeLists.txt | ||
+++ b/3rdparty/libpng/CMakeLists.txt | ||
@@ -38,6 +38,8 @@ if(ARM OR AARCH64) | ||
else() | ||
add_definitions(-DPNG_ARM_NEON_OPT=0) # NEON assembler is not supported | ||
endif() | ||
+else() | ||
+ add_definitions(-DPNG_ARM_NEON_OPT=0) # NEON assembler is not supported | ||
endif() | ||
|
||
if(";${CPU_BASELINE_FINAL};" MATCHES "SSE2" |