Skip to content

add macos catalyst support #556

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

Merged
merged 1 commit into from
Nov 2, 2020
Merged

Conversation

sercand
Copy link
Contributor

@sercand sercand commented Nov 2, 2020

Closes #471.

Due to #408 as described here, cc treats compiler as gnu compiler and still fails to add required flags. We still need manually set CXX as a workaround.

@alexcrichton alexcrichton merged commit e76ec87 into rust-lang:master Nov 2, 2020
@alexcrichton
Copy link
Member

Thanks!

@eranrund
Copy link
Contributor

Hello @sercand and @alexcrichton !

Sorry to bring up this old PR, but I'm wondering about a decision made in it. Looking at https://github.com/alexcrichton/cc-rs/pull/556/files#diff-b1a35a68f14e696205874893c07fd24fdb88882b47c23cc0e0c80a30c7d53759R1466, I am curious why the arm64 version uses ios vs ios13.0 on x64.

I ran into this while trying to build mbedtls for the target aarch64-apple-ios-macabi. With ios, I am getting the following error:

[mbedtls-sys-auto 2.26.1] cd /Users/eran/Projects/fog/target/aarch64-apple-ios-macabi/release/build/mbedtls-sys-auto-32061b327ca02d13/out/build/library && /usr/bin/clang  -I/Users/eran/.cargo/git/checkouts/rust-mbedtls-83053073cf3ce6f5/1cc2220/mbedtls-sys/vendor/include -I/Users/eran/.cargo/git/checkouts/rust-mbedtls-83053073cf3ce6f5/1cc2220/mbedtls-sys/vendor/library -DMBEDTLS_CONFIG_FILE="\"/Users/eran/Projects/fog/target/aarch64-apple-ios-macabi/release/build/mbedtls-sys-auto-32061b327ca02d13/out/config.h\"" -fPIC --target=arm64-apple-ios-macabi -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -fembed-bitcode -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Werror -Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code -O2 -g -DNDEBUG -arch arm64 -MD -MT library/CMakeFiles/mbedcrypto.dir/threading.c.o -MF CMakeFiles/mbedcrypto.dir/threading.c.o.d -o CMakeFiles/mbedcrypto.dir/threading.c.o -c /Users/eran/.cargo/git/checkouts/rust-mbedtls-83053073cf3ce6f5/1cc2220/mbedtls-sys/vendor/library/threading.c
[mbedtls-sys-auto 2.26.1] /Users/eran/.cargo/git/checkouts/rust-mbedtls-83053073cf3ce6f5/1cc2220/mbedtls-sys/vendor/library/threading.c:76:23: error: 'pthread_mutex_init' is only available on macCatalyst 13.0 or newer [-Werror,-Wunguarded-availability-new]
[mbedtls-sys-auto 2.26.1]     mutex->is_valid = pthread_mutex_init( &mutex->mutex, NULL ) == 0;

As expected, moving to ios13.0 fixes it and I am able to build. Perhaps this should be configurable, if not simply bumped to 13.0?

Thanks!

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

Successfully merging this pull request may close these issues.

Building wrong Target when building for Mac Catalyst
3 participants