Skip to content
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

Support building for aarch64-apple-darwin target #10

Open
repi opened this issue Dec 19, 2020 · 0 comments
Open

Support building for aarch64-apple-darwin target #10

repi opened this issue Dec 19, 2020 · 0 comments

Comments

@repi
Copy link

repi commented Dec 19, 2020

When building for the new aarch64-apple-darwin target for the new Mac M1 ARM CPUs with Nightly the C++ compilation fails with:

  running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-arch" "arm64" "-I" "mimalloc/include" "-I" "mimalloc/src" "-std=gnu11" "-Wall" "-Wextra" "-Wno-unknown-pragmas" "-ftls-model=initial-exec" "-Wno-invalid-memory-model" "-fstack-protector-all" "-fno-strict-aliasing" "-DMI_STATIC_LIB" "-DMI_DEBUG=3" "-DMI_SECURE=2" "-DMI_VERBOSE=0" "-DMI_STAT=0" "-o" "/Users/repi/git/rust/mimallocator/target/debug/build/mimalloc-sys-4a112146a3fd8379/out/mimalloc/src/static.o" "-c" "mimalloc/src/static.c"
  cargo:warning=warning: unknown warning option '-Wno-invalid-memory-model'; did you mean '-Wno-invalid-pp-token'? [-Wunknown-warning-option]
  cargo:warning=In file included from mimalloc/src/static.c:10:
  cargo:warning=mimalloc/include/mimalloc-internal.h:353:11: error: unknown token in expression
  cargo:warning=  __asm__("movq %%gs:0, %0" : "=r" (tid) : : );  // x86_64 macOS uses GS
  cargo:warning=          ^
  cargo:warning=<inline asm>:1:7: note: instantiated into assembly here
  cargo:warning=        movq %gs:0, x8
  cargo:warning=             ^
  cargo:warning=In file included from mimalloc/src/static.c:10:
  cargo:warning=mimalloc/include/mimalloc-internal.h:353:11: error: invalid operand
  cargo:warning=  __asm__("movq %%gs:0, %0" : "=r" (tid) : : );  // x86_64 macOS uses GS
  cargo:warning=          ^
  cargo:warning=<inline asm>:1:7: note: instantiated into assembly here
  cargo:warning=        movq %gs:0, x8
  cargo:warning=             ^
  cargo:warning=1 warning and 2 errors generated.
  exit code: 1

This is something we would like to support and probably would need an upgrade of latest mimalloc library and some smaller tweaks to get working.

Related: #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant