Skip to content

Commit 4b605f6

Browse files
committed
Allow execution of VM code on macOS
The Q3 VM compiles native code that is unsigned, which since Tahoe (possibly earlier) requires an entitlement to be set in order to execute it.
1 parent 0d1f4fd commit 4b605f6

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

cmake/entitlements.plist

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
3+
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
4+
<plist version="1.0">
5+
<dict>
6+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
7+
<true/>
8+
</dict>
9+
</plist>

cmake/platforms/macos.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if(NOT "$ENV{APPLE_CERTIFICATE_ID}" STREQUAL "")
9595

9696
add_custom_command(TARGET ${TARGET} POST_BUILD
9797
COMMAND codesign --force --deep --options runtime
98+
--entitlements ${CMAKE_SOURCE_DIR}/cmake/entitlements.plist
9899
--sign "$ENV{APPLE_CERTIFICATE_ID}"
99100
"$<TARGET_FILE:${TARGET}>"
100101
COMMENT "Code Signing for macOS: $<TARGET_FILE_BASE_NAME:${TARGET}>")

0 commit comments

Comments
 (0)