Skip to content

Commit a511d3d

Browse files
committed
build: Add entitlements
On Bigsur need to add Hypervisor framework entitlement. Based on https://stackoverflow.com/questions/64642062/apple-hypervisor-is-completely-broken-on-macos-big-sur-beta-11-0-1 via #300 (comment) Signed-off-by: Rolf Neugebauer <rn@rneugeba.io>
1 parent 4e6bee8 commit a511d3d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ $(TARGET).sym: $(OBJ)
179179
@echo dsym $(notdir $(TARGET).dSYM)
180180
$(VERBOSE) $(ENV) $(DSYM) $@ -o $(TARGET).dSYM
181181

182-
$(TARGET): $(TARGET).sym
182+
$(TARGET): $(TARGET).sym app.entitlements
183183
@echo strip $(notdir $@)
184184
$(VERBOSE) $(ENV) $(STRIP) $(TARGET).sym -o $@
185+
@echo sign $(notdir $@)
186+
$(VERBOSE) $(ENV) $(CODESIGN) -s - --entitlements app.entitlements --force $@
185187

186188
clean:
187189
@rm -rf build

app.entitlements

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

config.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ LD := clang
1919
STRIP := strip
2020
DSYM := dsymutil
2121
DTRACE := dtrace
22+
CODESIGN := codesign
2223

2324
ENV := \
2425
LANG=en_US.US-ASCII

0 commit comments

Comments
 (0)