Open
Description
Undefined symbols for architecture x86_64:
"___isOSVersionAtLeast", referenced from:
_foo in test-4022da.o
ld: symbol(s) not found for architecture x86_64
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
Previous command exited with 1
vchuravy@odin ~/b/Y/test (vc/llvm_10_patch) [1]> cat bundled/test.c
int foo() {
/// that is a CLang extension
#if __has_builtin(__builtin_available)
if(__builtin_available(macOS 10.12, iOS 9.0, tvOS 9.0, watchOS 2.0, *)) {
return 256;
}
#endif
return 42;
}
int main() {
return foo();
}
vchuravy@odin ~/b/Y/test (vc/llvm_10_patch)> cat build_tarballs.jl
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
name = "test"
version = v"0.1.0"
# Collection of sources required to complete build
sources = [
DirectorySource("./bundled")
]
# Bash recipe for building across all platforms
script = raw"""
clang -mmacosx-version-min=10.8 test.c -o test
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
MacOS(:x86_64),
]
# The products that we will ensure are always built
products = [
ExecutableProduct("test", :test)
]
# Dependencies that must be installed before this package can be built
dependencies = [
]
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
preferred_gcc_version=v"7", preferred_llvm_version=v"8")