Premake: Reorder links to speed up building.

- Re-enable LTO on clang.
- Set AR on travis so it builds with LTO.
This commit is contained in:
Joel Linn 2020-11-04 16:04:07 +01:00 committed by Rick Gibbed
parent 9dea6b3f62
commit 8b1ebe1130
6 changed files with 71 additions and 60 deletions

View File

@ -28,9 +28,9 @@ addons:
jobs: jobs:
include: include:
- env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 LINT=true - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 AR_COMPILER=llvm-ar-9 LINT=true
- env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Debug - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 AR_COMPILER=llvm-ar-9 BUILD=true CONFIG=Debug
- env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 BUILD=true CONFIG=Release - env: C_COMPILER=clang-9 CXX_COMPILER=clang++-9 AR_COMPILER=llvm-ar-9 BUILD=true CONFIG=Release
git: git:
# We handle submodules ourselves in xenia-build setup. # We handle submodules ourselves in xenia-build setup.
@ -40,8 +40,10 @@ before_script:
- export LIBVULKAN_VERSION=1.1.70 - export LIBVULKAN_VERSION=1.1.70
- export CXX=$CXX_COMPILER - export CXX=$CXX_COMPILER
- export CC=$C_COMPILER - export CC=$C_COMPILER
- export AR=$AR_COMPILER
# Dump useful info. # Dump useful info.
- $CXX --version - $CXX --version
- $AR_COMPILER --version
- python3 --version - python3 --version
- clang-format-9 --version - clang-format-9 --version
- clang-format-9 -style=file -dump-config - clang-format-9 -style=file -dump-config

View File

@ -91,7 +91,6 @@ filter("platforms:Linux")
buildoptions({ buildoptions({
-- "-mlzcnt", -- (don't) Assume lzcnt is supported. -- "-mlzcnt", -- (don't) Assume lzcnt is supported.
({os.outputof("pkg-config --cflags gtk+-x11-3.0")})[1], ({os.outputof("pkg-config --cflags gtk+-x11-3.0")})[1],
"-fno-lto", -- Premake doesn't support LTO on clang
}) })
links({ links({
"stdc++fs", "stdc++fs",

View File

@ -8,19 +8,6 @@ project("xenia-app")
targetname("xenia") targetname("xenia")
language("C++") language("C++")
links({ links({
"aes_128",
"capstone",
"fmt",
"dxbc",
"discord-rpc",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xenia-app-discord", "xenia-app-discord",
"xenia-apu", "xenia-apu",
"xenia-apu-nop", "xenia-apu-nop",
@ -42,6 +29,21 @@ project("xenia-app")
"xenia-ui-spirv", "xenia-ui-spirv",
"xenia-ui-vulkan", "xenia-ui-vulkan",
"xenia-vfs", "xenia-vfs",
})
links({
"aes_128",
"capstone",
"fmt",
"dxbc",
"discord-rpc",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xxhash", "xxhash",
}) })
defines({ defines({

View File

@ -25,15 +25,6 @@ project("xenia-gpu-d3d12-trace-viewer")
kind("WindowedApp") kind("WindowedApp")
language("C++") language("C++")
links({ links({
"aes_128",
"capstone",
"dxbc",
"fmt",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"xenia-apu", "xenia-apu",
"xenia-apu-nop", "xenia-apu-nop",
"xenia-base", "xenia-base",
@ -48,6 +39,17 @@ project("xenia-gpu-d3d12-trace-viewer")
"xenia-ui", "xenia-ui",
"xenia-ui-d3d12", "xenia-ui-d3d12",
"xenia-vfs", "xenia-vfs",
})
links({
"aes_128",
"capstone",
"dxbc",
"fmt",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"xxhash", "xxhash",
}) })
files({ files({
@ -70,15 +72,6 @@ project("xenia-gpu-d3d12-trace-dump")
kind("ConsoleApp") kind("ConsoleApp")
language("C++") language("C++")
links({ links({
"aes_128",
"capstone",
"dxbc",
"fmt",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"xenia-apu", "xenia-apu",
"xenia-apu-nop", "xenia-apu-nop",
"xenia-base", "xenia-base",
@ -93,6 +86,17 @@ project("xenia-gpu-d3d12-trace-dump")
"xenia-ui", "xenia-ui",
"xenia-ui-d3d12", "xenia-ui-d3d12",
"xenia-vfs", "xenia-vfs",
})
links({
"aes_128",
"capstone",
"dxbc",
"fmt",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"xxhash", "xxhash",
}) })
files({ files({
@ -107,4 +111,4 @@ project("xenia-gpu-d3d12-trace-dump")
"2>&1", "2>&1",
"1>scratch/stdout-trace-dump.txt", "1>scratch/stdout-trace-dump.txt",
}) })
end end

View File

@ -30,17 +30,6 @@ project("xenia-gpu-vulkan-trace-viewer")
kind("WindowedApp") kind("WindowedApp")
language("C++") language("C++")
links({ links({
"aes_128",
"capstone",
"fmt",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xenia-apu", "xenia-apu",
"xenia-apu-nop", "xenia-apu-nop",
"xenia-base", "xenia-base",
@ -56,6 +45,19 @@ project("xenia-gpu-vulkan-trace-viewer")
"xenia-ui-spirv", "xenia-ui-spirv",
"xenia-ui-vulkan", "xenia-ui-vulkan",
"xenia-vfs", "xenia-vfs",
})
links({
"aes_128",
"capstone",
"fmt",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xxhash", "xxhash",
}) })
defines({ defines({
@ -97,17 +99,6 @@ project("xenia-gpu-vulkan-trace-dump")
kind("ConsoleApp") kind("ConsoleApp")
language("C++") language("C++")
links({ links({
"aes_128",
"capstone",
"fmt",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xenia-apu", "xenia-apu",
"xenia-apu-nop", "xenia-apu-nop",
"xenia-base", "xenia-base",
@ -123,6 +114,19 @@ project("xenia-gpu-vulkan-trace-dump")
"xenia-ui-spirv", "xenia-ui-spirv",
"xenia-ui-vulkan", "xenia-ui-vulkan",
"xenia-vfs", "xenia-vfs",
})
links({
"aes_128",
"capstone",
"fmt",
"glslang-spirv",
"imgui",
"libavcodec",
"libavutil",
"mspack",
"snappy",
"spirv-tools",
"volk",
"xxhash", "xxhash",
}) })
defines({ defines({

View File

@ -41,11 +41,11 @@ project("xenia-hid-demo")
filter("platforms:Linux") filter("platforms:Linux")
links({ links({
"SDL2",
"vulkan",
"X11", "X11",
"xcb", "xcb",
"X11-xcb", "X11-xcb",
"vulkan",
"SDL2",
}) })
filter("platforms:Windows") filter("platforms:Windows")