Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit d2d8d90

Browse files
committed
Pass --host to autoconf, it does not use ARCHFLAGS
Otherwise we get the wrong architecture for MacOS builds
1 parent 3200051 commit d2d8d90

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

scripts/build-codecs.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,18 @@ def run(cmd):
9191
if not os.path.exists(output_tarball):
9292
os.chdir(build_dir)
9393

94-
prepend_env("CPPFLAGS", "-I" + os.path.join(dest_dir, "include"))
95-
prepend_env("LDFLAGS", "-L" + os.path.join(dest_dir, "lib"))
9694
prepend_env("PATH", os.path.join(dest_dir, "bin"), separator=":")
97-
prepend_env(
98-
"PKG_CONFIG_PATH", os.path.join(dest_dir, "lib", "pkgconfig"), separator=":"
99-
)
95+
if platform.system() == "Darwin" and os.environ.get("ARCHFLAGS") == "-arch arm64":
96+
opus_configure_args = [
97+
"--build",
98+
"x86_64-apple-darwin20.6.0",
99+
"--host",
100+
"amd64-apple-darwin20.6.0",
101+
]
102+
vpx_configure_args = ["--target=arm64-darwin20-gcc"]
103+
else:
104+
opus_configure_args = []
105+
vpx_configure_args = []
100106

101107
#### BUILD TOOLS ####
102108

@@ -121,7 +127,8 @@ def run(cmd):
121127
"--disable-shared",
122128
"--enable-static",
123129
"--with-pic",
124-
],
130+
]
131+
+ opus_configure_args,
125132
)
126133

127134
# build vpx
@@ -133,7 +140,8 @@ def run(cmd):
133140
"--disable-tools",
134141
"--disable-unit-tests",
135142
"--enable-pic",
136-
],
143+
]
144+
+ vpx_configure_args,
137145
)
138146

139147
run(["tar", "czvf", output_tarball, "-C", dest_dir, "include", "lib"])

0 commit comments

Comments
 (0)