Unverified Commit 17798ad7 authored by Daniel Thornburgh's avatar Daniel Thornburgh Committed by GitHub
Browse files

[lldb] Use get-task-allow entitlement on macOS too (#71112)

Running the LLDB test suite in a GUI-less macOS environment (say, ssh)
requires that the debugged tasks be signed with the get-task-allow
entitlement.
parent a6c8e27b
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -88,17 +88,18 @@ class BuilderDarwin(Builder):
                args["FRAMEWORK_INCLUDES"] = "-F{}".format(private_frameworks)

        operating_system, env = get_os_and_env()
        if operating_system and operating_system != "macosx":

        builder_dir = os.path.dirname(os.path.abspath(__file__))
        test_dir = os.path.dirname(builder_dir)
        if not operating_system:
            entitlements_file = "entitlements-macos.plist"
        else:
            if env == "simulator":
                entitlements_file = "entitlements-simulator.plist"
            else:
                entitlements_file = "entitlements.plist"
        entitlements = os.path.join(test_dir, "make", entitlements_file)
        args["CODESIGN"] = "codesign --entitlements {}".format(entitlements)
        else:
            args["CODESIGN"] = "codesign"

        # Return extra args as a formatted string.
        return ["{}={}".format(key, value) for key, value in args.items()]
+8 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.get-task-allow</key>
    <true/>
</dict>
</plist>