Issue |
125309
|
Summary |
compiler_rt build for watchOS/tvOS
|
Labels |
|
Assignees |
|
Reporter |
DmT021
|
compiler_rt doesn't build for watchOS/tvOS, because the following functions are explicitly marked unavailable.
```C
pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
int execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int,
int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawnattr_init(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawnattr_destroy(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawnattr_setflags(posix_spawnattr_t *, short) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
int posix_spawn(pid_t * __restrict, const char * __restrict,
const posix_spawn_file_actions_t *,
const posix_spawnattr_t * __restrict,
char *const __argv[__restrict],
char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
```
<details>
<summary>Log</summary>
```
[4675/5208][ 89%][1646.297s] Performing build step for 'compiler-rt'
[6522/8323][ 78%][135.376s] Building CXX object lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.watchossim.dir/sanitizer_mac.cpp.o
FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.watchossim.dir/sanitizer_mac.cpp.o
/opt/homebrew/bin/sccache /Users/dmt021/w/swift-project/build/Ninja-RelWithDebInfoAssert/llvm-macosx-arm64/bin/clang++ -DHAVE_RPC_XDR_H=1 -I/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/.. -Wall -Wno-unused-parameter -O2 -g -DNDEBUG -std=c++17 -arch arm64 -arch i386 -arch x86_64 -isysroot /Applications/Xcode16.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -stdlib=libc++ -mwatchos-simulator-version-min=2.0 -isysroot /Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk -fPIC -fno-builtin -fno-exceptions -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -g -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.watchossim.dir/sanitizer_mac.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.watchossim.dir/sanitizer_mac.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.watchossim.dir/sanitizer_mac.cpp.o -c /Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:253:10: error: 'fork' is unavailable: not available on watchOS
253 | return fork();
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/unistd.h:447:8: note: 'fork' has been explicitly marked unavailable here
447 | pid_t fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:299:9: error: 'posix_spawn_file_actions_init' is unavailable: not available on watchOS
299 | res = posix_spawn_file_actions_init(&acts);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:83:9: note: 'posix_spawn_file_actions_init' has been explicitly marked unavailable here
83 | int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:303:5: error: 'posix_spawn_file_actions_destroy' is unavailable: not available on watchOS
303 | posix_spawn_file_actions_destroy(&acts);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:81:9: note: 'posix_spawn_file_actions_destroy' has been explicitly marked unavailable here
81 | int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:306:9: error: 'posix_spawn_file_actions_adddup2' is unavailable: not available on watchOS
306 | res = posix_spawn_file_actions_adddup2(&acts, secondary_fd, STDIN_FILENO) ||
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:74:9: note: 'posix_spawn_file_actions_adddup2' has been explicitly marked unavailable here
74 | int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int,
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:307:9: error: 'posix_spawn_file_actions_adddup2' is unavailable: not available on watchOS
307 | posix_spawn_file_actions_adddup2(&acts, secondary_fd, STDOUT_FILENO) ||
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:74:9: note: 'posix_spawn_file_actions_adddup2' has been explicitly marked unavailable here
74 | int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int,
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:308:9: error: 'posix_spawn_file_actions_addclose' is unavailable: not available on watchOS
308 | posix_spawn_file_actions_addclose(&acts, secondary_fd);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:72:9: note: 'posix_spawn_file_actions_addclose' has been explicitly marked unavailable here
72 | int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:313:9: error: 'posix_spawnattr_init' is unavailable: not available on watchOS
313 | res = posix_spawnattr_init(&attrs);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:99:9: note: 'posix_spawnattr_init' has been explicitly marked unavailable here
99 | int posix_spawnattr_init(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:317:5: error: 'posix_spawnattr_destroy' is unavailable: not available on watchOS
317 | posix_spawnattr_destroy(&attrs);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:85:9: note: 'posix_spawnattr_destroy' has been explicitly marked unavailable here
85 | int posix_spawnattr_destroy(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:322:9: error: 'posix_spawnattr_setflags' is unavailable: not available on watchOS
322 | res = posix_spawnattr_setflags(&attrs, POSIX_SPAWN_CLOEXEC_DEFAULT);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:104:9: note: 'posix_spawnattr_setflags' has been explicitly marked unavailable here
104 | int posix_spawnattr_setflags(posix_spawnattr_t *, short) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos);
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:328:9: error: 'posix_spawn' is unavailable: not available on watchOS
328 | res = posix_spawn(pid, argv[0], &acts, &attrs, argv_casted, envp_casted);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/spawn.h:60:9: note: 'posix_spawn' has been explicitly marked unavailable here
60 | int posix_spawn(pid_t * __restrict, const char * __restrict,
| ^
/Users/dmt021/w/swift-project/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp:379:10: error: 'execve' is unavailable: not available on watchOS
379 | return execve(filename, argv, envp);
| ^
/Applications/Xcode16.2.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator11.2.sdk/usr/include/unistd.h:445:6: note: 'execve' has been explicitly marked unavailable here
445 | int execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
| ^
```
</details>
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs