Add support for AppleClang and iOS cross compilation
authorCharles Giessen <charles@lunarg.com>
Thu, 17 Aug 2023 22:12:26 +0000 (16:12 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 18 Aug 2023 16:05:18 +0000 (10:05 -0600)
commitdd8332d253cfaf3a9be306af4194e4dffc2e3b3c
tree7d53909fb1f9e2094ece10362d1b93bd307b893d
parent4830af39dce87b415de1c99edbc3283844d38903
Add support for AppleClang and iOS cross compilation

Compiling for iOS on an intel mac failed due to not handling the locations of
gen_defines.asm and asm_offset.s when running under AppleClang. This solution
works for the toolchain file used during development but may not work in other
situations.

iOS does not support secure_getenv, which is fine, except that the cmake
code check_function_exists seems to think it is supported, causing compilation
to fail. Just hardcoding secure_getenv to not be supported is enough for
the unix shim logic to compile.

The compilation revelaed a few issues in the test code, like not using
[[maybe_unused]] and a signed/unsigned comparison.
CMakeLists.txt
loader/CMakeLists.txt
scripts/parse_asm_values.py
tests/framework/icd/test_icd.cpp
tests/framework/shim/unix_shim.cpp