Skip to content

Commit

Permalink
search for ios sysroot only when necessary
Browse files Browse the repository at this point in the history
Addresses this: https://2dimensions.slack.com/archives/C07HMC68S4Q/p1730237272184439

Diffs=
bdb9eb01db search for ios sysroot only when necessary (#8437)

Co-authored-by: Erik Uggeldahl <erik@rive.app>
Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 1, 2024
1 parent c3be546 commit 81de6c7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
91d092f4fc0c536e65dcfc513252d7f2b159ec77
bdb9eb01db0e9aac7a22708e72576c301cc071dc
24 changes: 14 additions & 10 deletions build/rive_build_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -458,27 +458,22 @@ end

filter({})

if os.host() == 'macosx' then
if _OPTIONS['os'] == 'ios' then
iphoneos_sysroot = os.outputof('xcrun --sdk iphoneos --show-sdk-path')
if iphoneos_sysroot == nil then
error(
'Unable to locate iphoneos sdk. Please ensure Xcode Command Line Tools are installed.'
'Unable to locate iPhoneOS SDK. Please ensure Xcode and its iOS component are installed. Additionally, ensure Xcode Command Line Tools are pointing to that Xcode location with `xcode-select -p`.'
)
end

iphonesimulator_sysroot = os.outputof('xcrun --sdk iphonesimulator --show-sdk-path')
if iphonesimulator_sysroot == nil then
error(
'Unable to locate iphonesimulator sdk. Please ensure Xcode Command Line Tools are installed.'
'Unable to locate iPhone simulator SDK. Please ensure Xcode and its iOS component are installed. Additionally, ensure Xcode Command Line Tools are pointing to that Xcode location with `xcode-select -p`.'
)
end

filter('system:ios')
do
buildoptions({ '-fembed-bitcode ' })
end

filter({ 'system:ios', 'options:variant=system' })
filter('options:variant=system')
do
buildoptions({
'--target=arm64-apple-ios13.0.0',
Expand All @@ -487,7 +482,7 @@ if os.host() == 'macosx' then
})
end

filter({ 'system:ios', 'options:variant=emulator' })
filter('options:variant=emulator')
do
buildoptions({
'--target=arm64-apple-ios13.0.0-simulator',
Expand All @@ -496,6 +491,15 @@ if os.host() == 'macosx' then
})
end

filter({})
end

if os.host() == 'macosx' then
filter('system:ios')
do
buildoptions({ '-fembed-bitcode ' })
end

filter('system:macosx or system:ios')
do
buildoptions({ '-fobjc-arc' })
Expand Down

0 comments on commit 81de6c7

Please sign in to comment.