From a511d3d5d9dba738e982d0090d4cc9d9e3d54579 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Thu, 17 Dec 2020 23:23:08 +0000 Subject: [PATCH] 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 https://github.com/moby/hyperkit/issues/300#issuecomment-747457675 Signed-off-by: Rolf Neugebauer --- Makefile | 4 +++- app.entitlements | 8 ++++++++ config.mk | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 app.entitlements diff --git a/Makefile b/Makefile index 42b25230..066e4cc8 100644 --- a/Makefile +++ b/Makefile @@ -179,9 +179,11 @@ $(TARGET).sym: $(OBJ) @echo dsym $(notdir $(TARGET).dSYM) $(VERBOSE) $(ENV) $(DSYM) $@ -o $(TARGET).dSYM -$(TARGET): $(TARGET).sym +$(TARGET): $(TARGET).sym app.entitlements @echo strip $(notdir $@) $(VERBOSE) $(ENV) $(STRIP) $(TARGET).sym -o $@ + @echo sign $(notdir $@) + $(VERBOSE) $(ENV) $(CODESIGN) -s - --entitlements app.entitlements --force $@ clean: @rm -rf build diff --git a/app.entitlements b/app.entitlements new file mode 100644 index 00000000..08afa108 --- /dev/null +++ b/app.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.hypervisor + + + \ No newline at end of file diff --git a/config.mk b/config.mk index f7f19acb..8682e937 100644 --- a/config.mk +++ b/config.mk @@ -19,6 +19,7 @@ LD := clang STRIP := strip DSYM := dsymutil DTRACE := dtrace +CODESIGN := codesign ENV := \ LANG=en_US.US-ASCII