-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explicitly link to OpenMP #290
Conversation
0178497
to
f2e0c10
Compare
0dcfd6f
to
9de1e3d
Compare
This reverts commit 9de1e3d.
Manually tested that the produced M1 wheel works. |
pyproject.toml
Outdated
@@ -45,7 +45,7 @@ before-build = [ | |||
] | |||
|
|||
[tool.cibuildwheel.macos.environment] | |||
LDFLAGS="-Wl,-rpath,$CONDA/envs/build/lib -L$CONDA/envs/build/lib" | |||
LDFLAGS="-Wl,-rpath,$CONDA/envs/build/lib -L$CONDA/envs/build/lib -lomp -ljemalloclocal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(How) is this related to
Lines 62 to 86 in fbf7755
elif sys.platform == "darwin": | |
jemalloc_config = shutil.which("jemalloc-config") | |
if "JE_INSTALL_SUFFIX" in os.environ: | |
je_install_suffix = os.environ["JE_INSTALL_SUFFIX"] | |
elif jemalloc_config is None: | |
je_install_suffix = "" | |
else: | |
pkg_info = ( | |
Path(jemalloc_config).parent.parent / "lib" / "pkgconfig" / "jemalloc.pc" | |
).read_text() | |
je_install_suffix = [ | |
i.split("=")[1] | |
for i in pkg_info.split("\n") | |
if i.startswith("install_suffix=") | |
].pop() | |
allocator_libs = [f"jemalloc{je_install_suffix}"] | |
extra_compile_args = [ | |
"-Xpreprocessor", | |
"-fopenmp", | |
"-O3", | |
"-ffast-math", | |
"--std=c++17", | |
f"-DJEMALLOC_INSTALL_SUFFIX={je_install_suffix}", | |
] | |
extra_link_args = ["-lomp"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the fix above, it might work without these flags again. Let's try.
Fixes #220
Checklist
CHANGELOG.rst
entry