Skip to content

Commit

Permalink
Use system import directory when compiling sandboxes
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270868
rdar://124373752

Reviewed by Chris Dumez.

Use system import directory when compiling sandboxes on macOS. This fixes a build issue seen on some
host configurations.

This patch was written by Christian Schmidt and Per Arne Vollan.

* Source/WebKit/Scripts/compile-sandbox.sh:

Canonical link: https://commits.webkit.org/275996@main
  • Loading branch information
pvollan committed Mar 12, 2024
1 parent 899b2d1 commit 6c474aa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/WebKit/Scripts/compile-sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ fi;

if [[ $SDK_NAME =~ "mac" ]]; then
if [[ $SANDBOX_NAME == "com.apple.WebKit.GPUProcess" || $SANDBOX_NAME == "com.apple.WebKit.NetworkProcess" || $SANDBOX_NAME == "com.apple.WebProcess" ]]; then
xcrun --sdk $SDK_NAME sbutil compile -D ENABLE_SANDBOX_MESSAGE_FILTER=YES -D WEBKIT2_FRAMEWORK_DIR=dir -D HOME_DIR=dir -D HOME_LIBRARY_PREFERENCES_DIR=dir -D DARWIN_USER_CACHE_DIR=dir -D DARWIN_USER_TEMP_DIR=dir $SANDBOX_PATH > /dev/null;
# Use the IMPORT_DIR of the build host.
# That's acceptable for syntax check purposes, but will prevent adoption of
# new rules in imports, e.g. when the build host runs an older macOS version.
xcrun --sdk $SDK_NAME sbutil compile -D IMPORT_DIR=/System/Library/Sandbox/Profiles -D ENABLE_SANDBOX_MESSAGE_FILTER=YES -D WEBKIT2_FRAMEWORK_DIR=dir -D HOME_DIR=dir -D HOME_LIBRARY_PREFERENCES_DIR=dir -D DARWIN_USER_CACHE_DIR=dir -D DARWIN_USER_TEMP_DIR=dir $SANDBOX_PATH > /dev/null;
if [[ $? != 0 ]]; then
exit 1;
fi
Expand Down

0 comments on commit 6c474aa

Please sign in to comment.