Skip to content

Commit

Permalink
Update version to macosx 11 for runtime.
Browse files Browse the repository at this point in the history
Sorry for the churn in the premake file, someone didn't use the right formatter in a previous commit.

We had to bump to 11 for this:
```
../../../../../../pls/renderer/metal/background_shader_compiler.mm:215:42: error: 'MTLLanguageVersion2_3' is only available on macOS 11.0 or newer [-Werror,-Wunguarded-availability-new]
        compileOptions.languageVersion = MTLLanguageVersion2_3; // On mac, we need version 2.3+
                                         ^~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h:190:5: note: 'MTLLanguageVersion2_3' has been marked as being introduced in macOS 11.0 here, but the deployment target is macOS 10.6.0
    MTLLanguageVersion2_3 API_AVAILABLE(macos(11.0), ios(14.0)) = (2 << 16) + 3,
    ^
../../../../../../pls/renderer/metal/background_shader_compiler.mm:215:42: note: enclose 'MTLLanguageVersion2_3' in an @available check to silence this warning
        compileOptions.languageVersion = MTLLanguageVersion2_3; // On mac, we need version 2.3+
                                         ^~~~~~~~~~~~~~~~~~~~~
../../../../../../pls/renderer/metal/background_shader_compiler.mm:220:28: error: 'setPreserveInvariance:' is only available on macOS 11.0 or newer [-Werror,-Wunguarded-availability-new]
            compileOptions.preserveInvariance = YES;
```

Diffs=
e75b8fa63 Update version to macosx 11 for runtime. (#7829)

Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
  • Loading branch information
luigi-rosso and luigi-rosso committed Aug 13, 2024
1 parent 4a3beb7 commit 2615d26
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
55de8286c5ba680de950a3a0aac26e13bb890d6b
e75b8fa633a4f8eb102e669ac1308b1d1151fed1
27 changes: 23 additions & 4 deletions build/rive_build_config.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if _ACTION == 'ninja' then
require "ninja"
require('ninja')
end

if _ACTION == 'export-compile-commands' then
require "export-compile-commands"
require('export-compile-commands')
end

workspace('rive')
Expand Down Expand Up @@ -409,12 +409,16 @@ filter({})
if os.host() == 'macosx' 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.')
error(
'Unable to locate iphoneos sdk. Please ensure Xcode Command Line Tools are installed.'
)
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.')
error(
'Unable to locate iphonesimulator sdk. Please ensure Xcode Command Line Tools are installed.'
)
end

filter('system:ios')
Expand Down Expand Up @@ -445,6 +449,21 @@ if os.host() == 'macosx' then
buildoptions({ '-fobjc-arc' })
end

filter({ 'system:macosx' })
do
buildoptions({
'-mmacosx-version-min=11.0',
})
end

filter({ 'system:macosx', 'options:arch=host', 'action:xcode4' })
do
-- xcode tries to specify a target...
buildoptions({
'--target=' .. os.outputof('uname -m') .. '-apple-macos11.0',
})
end

filter({ 'system:macosx', 'options:arch=arm64 or arch=universal' })
do
buildoptions({ '-arch arm64' })
Expand Down

0 comments on commit 2615d26

Please sign in to comment.