Skip to content

Commit

Permalink
More LTO tweaks
Browse files Browse the repository at this point in the history
Don't use premake's "LinkTimeOptimization" flag on Mac either. This will attempt to use llvm-ar, which doesn't always exist on Mac.

Enable premake's "LinkTimeOptimization" flag on Windows.

Diffs=
e2328daeb More LTO tweaks (#6904)

Co-authored-by: Chris Dalton <[email protected]>
  • Loading branch information
csmartdalton and csmartdalton committed Mar 20, 2024
1 parent 68ba1f9 commit 4f8e43d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cae08a3c5612afad5077dcd6008b73b33fa3c938
e2328daeb02a92171cd3c0ab78c3c76695a9dd98
6 changes: 3 additions & 3 deletions build/rive_build_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ do
optimize('On')
end

filter({ 'options:config=release', 'options:not no-lto', 'not system:ios or windows' })
filter({ 'options:config=release', 'options:not no-lto', 'system:not macosx', 'system:not ios'})
do
flags({ 'LinkTimeOptimization' })
end

-- The 'LinkTimeOptimization' premake flag generates errors when building for ios.
filter({ 'options:config=release', 'options:not no-lto', 'system:ios' })
filter({ 'options:config=release', 'options:not no-lto', 'system:macosx or ios' })
do
-- The 'LinkTimeOptimization' flag attempts to use llvm-ar, which doesn't always exist on macos.
buildoptions({ '-flto=full' })
linkoptions({ '-flto=full' })
end
Expand Down

0 comments on commit 4f8e43d

Please sign in to comment.