From af444534caa5100407bbe42c82fad92b4f44bebc Mon Sep 17 00:00:00 2001 From: star9029 Date: Mon, 27 Oct 2025 22:39:58 +0800 Subject: [PATCH 01/13] 21.1.4 --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- xmake.lua | 19 ++++++++++++------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 065a658..39c2f7e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,7 +12,7 @@ jobs: include: - build_type: debug lto: "n" - - build_type: release + - build_type: releasedbg lto: "n" - build_type: release lto: "y" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d27031e..aacdacd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,7 +12,7 @@ jobs: include: - build_type: debug lto: "n" - - build_type: release + - build_type: releasedbg lto: "n" - build_type: release lto: "y" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e95d0cc..8d37590 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: include: - - build_type: release + - build_type: releasedbg runtimes: MD lto: "n" - build_type: release diff --git a/xmake.lua b/xmake.lua index 9c853e0..9267e4b 100644 --- a/xmake.lua +++ b/xmake.lua @@ -3,6 +3,7 @@ set_policy("compatibility.version", "3.0") add_requires("llvm", { system = false, configs = { + mode = get_config("mode"), debug = is_mode("debug"), shared = is_mode("debug") and not is_plat("windows"), }, @@ -21,14 +22,12 @@ if is_mode("debug") then end package("llvm") - set_urls("https://github.com/llvm/llvm-project/releases/download/llvmorg-$(version)/llvm-project-$(version).src.tar.xz", - "https://github.com/llvm/llvm-project.git", {includes = sparse_checkout_list}) + add_urls("https://github.com/llvm/llvm-project.git", {alias = "git", includes = sparse_checkout_list}) - add_versions("20.1.5", "a069565cd1c6aee48ee0f36de300635b5781f355d7b3c96a28062d50d575fa3e") + add_versions("git:21.1.4", "llvmorg-21.1.4") + add_versions("git:20.1.5", "llvmorg-20.1.5") - if is_plat("windows") then - add_configs("debug", {description = "Enable debug symbols.", default = false, type = "boolean", readonly = true}) - end + add_configs("mode", {description = "Build type", default = "releasedbg", type = "string", values = {"debug", "release", "releasedbg"}}) if is_plat("windows", "mingw") then add_syslinks("version", "ntdll") @@ -88,7 +87,13 @@ package("llvm") -- "-DLLVM_ENABLE_PROJECTS=clang", } - table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) + + local build_type = { + ["debug"] = "Debug", + ["release"] = "Release", + ["releasedbg"] = "RELWITHDEBINFO", + } + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (build_type[package:config("mode")])) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DLLVM_ENABLE_LTO=" .. (package:config("lto") and "ON" or "OFF")) if package:config("lto") then From 2ba811b3a34d5921b0d75fc2761f77260d22e0f4 Mon Sep 17 00:00:00 2001 From: star9029 Date: Tue, 28 Oct 2025 00:47:29 +0800 Subject: [PATCH 02/13] apply CodeRabbit review --- .github/workflows/windows.yml | 2 +- xmake.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8d37590..8d3e390 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -33,7 +33,7 @@ jobs: - name: Package run: | - xmake config --yes --verbose --runtimes=${{ matrix.runtimes }} --policies=build.optimization.lto:${{ matrix.lto }} + xmake config --yes --verbose --mode=${{ matrix.build_type }} --runtimes=${{ matrix.runtimes }} --policies=build.optimization.lto:${{ matrix.lto }} - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/xmake.lua b/xmake.lua index 9267e4b..98f6be5 100644 --- a/xmake.lua +++ b/xmake.lua @@ -91,7 +91,7 @@ package("llvm") local build_type = { ["debug"] = "Debug", ["release"] = "Release", - ["releasedbg"] = "RELWITHDEBINFO", + ["releasedbg"] = "RelWithDebInfo", } table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (build_type[package:config("mode")])) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) @@ -181,7 +181,7 @@ package("llvm") package:arch(), package:plat(), abi, - package:is_debug() and "debug" or "release", + package:config("mode"), }, "-") if package:config("lto") then From edc440426167f1eb87b4a6d9f64c7c6849ee9ba4 Mon Sep 17 00:00:00 2001 From: ykiko Date: Thu, 30 Oct 2025 00:21:49 +0800 Subject: [PATCH 03/13] Fix build on macos --- xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/xmake.lua b/xmake.lua index 98f6be5..d7e2a29 100644 --- a/xmake.lua +++ b/xmake.lua @@ -114,6 +114,7 @@ package("llvm") end if package:is_plat("macosx") then + table.insert(configs, "-DLLVM_ENABLE_LIBCXX=ON") table.insert(configs, "-DLLVM_TARGETS_TO_BUILD=AArch64") table.insert(configs, "-DCMAKE_OSX_ARCHITECTURES=arm64") table.insert(configs, "-DCMAKE_LIBTOOL=/opt/homebrew/opt/llvm@20/bin/llvm-libtool-darwin") From 4fa539b5e09ad9757fc6d15e9ad61117dfbb75da Mon Sep 17 00:00:00 2001 From: star9029 Date: Thu, 30 Oct 2025 13:11:59 +0800 Subject: [PATCH 04/13] use llvm21 on macos --- .github/workflows/macos.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index aacdacd..c1b13c7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,11 +24,11 @@ jobs: steps: - name: Setup llvm run: | - brew install llvm@20 + brew install llvm@21 - name: Install lld run: | - brew install lld@20 + brew install lld@21 - name: Setup python run: | @@ -51,7 +51,7 @@ jobs: - name: Package run: | - export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm@21/bin:/opt/homebrew/opt/lld@21/bin:$PATH" xmake config --yes --verbose --toolchain=clang --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }} - name: Upload artifacts From 878886162821d6323f0f9311bb6ff5198adc0b37 Mon Sep 17 00:00:00 2001 From: ykiko Date: Thu, 30 Oct 2025 13:40:46 +0800 Subject: [PATCH 05/13] Fix macos build --- .github/workflows/macos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index c1b13c7..5b190b2 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -24,11 +24,11 @@ jobs: steps: - name: Setup llvm run: | - brew install llvm@21 + brew install llvm@20 - name: Install lld run: | - brew install lld@21 + brew install lld@20 - name: Setup python run: | @@ -51,6 +51,7 @@ jobs: - name: Package run: | + export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) export PATH="/opt/homebrew/opt/llvm@21/bin:/opt/homebrew/opt/lld@21/bin:$PATH" xmake config --yes --verbose --toolchain=clang --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }} From b9743e81a1923ee8bc84d35c82a40abc03cd69c7 Mon Sep 17 00:00:00 2001 From: ykiko Date: Thu, 30 Oct 2025 13:41:36 +0800 Subject: [PATCH 06/13] Fix --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5b190b2..0ebf2c9 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -52,7 +52,7 @@ jobs: - name: Package run: | export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) - export PATH="/opt/homebrew/opt/llvm@21/bin:/opt/homebrew/opt/lld@21/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@21/bin:$PATH" xmake config --yes --verbose --toolchain=clang --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }} - name: Upload artifacts From 69d02d0fec03e22803ab3a07523e9d6facdb5a86 Mon Sep 17 00:00:00 2001 From: ykiko Date: Thu, 30 Oct 2025 13:45:48 +0800 Subject: [PATCH 07/13] Fix --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0ebf2c9..5e8dcf5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -52,7 +52,7 @@ jobs: - name: Package run: | export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) - export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@21/bin:$PATH" + export PATH="/opt/homebrew/opt/llvm@20/bin:/opt/homebrew/opt/lld@20/bin:$PATH" xmake config --yes --verbose --toolchain=clang --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }} - name: Upload artifacts From 9e767c63bf2e8f0f0949a3f3b34eb6b4e75bdea9 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 31 Oct 2025 00:31:01 +0800 Subject: [PATCH 08/13] Enable lto for releasedbg. --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 39c2f7e..374b841 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,7 +13,7 @@ jobs: - build_type: debug lto: "n" - build_type: releasedbg - lto: "n" + lto: "y" - build_type: release lto: "y" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 5e8dcf5..a0678da 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,7 +13,7 @@ jobs: - build_type: debug lto: "n" - build_type: releasedbg - lto: "n" + lto: "y" - build_type: release lto: "y" diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8d3e390..713ef14 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,7 +12,7 @@ jobs: include: - build_type: releasedbg runtimes: MD - lto: "n" + lto: "y" - build_type: release runtimes: MT lto: "y" From ade077dca881826112c1e8b43c0faeff4949ec59 Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 31 Oct 2025 10:29:38 +0800 Subject: [PATCH 09/13] fix link job --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- xmake.lua | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 374b841..1c38e37 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,8 +13,8 @@ jobs: - build_type: debug lto: "n" - build_type: releasedbg - lto: "y" - - build_type: release + lto: "n" + - build_type: releasedbg lto: "y" concurrency: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a0678da..d7c5f66 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -13,8 +13,8 @@ jobs: - build_type: debug lto: "n" - build_type: releasedbg - lto: "y" - - build_type: release + lto: "n" + - build_type: releasedbg lto: "y" concurrency: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 713ef14..89ab41f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,8 +12,8 @@ jobs: include: - build_type: releasedbg runtimes: MD - lto: "y" - - build_type: release + lto: "n" + - build_type: releasedbg runtimes: MT lto: "y" diff --git a/xmake.lua b/xmake.lua index d7e2a29..15205ab 100644 --- a/xmake.lua +++ b/xmake.lua @@ -74,6 +74,7 @@ package("llvm") "-DLLVM_INCLUDE_BENCHMARKS=OFF", -- "-DCLANG_BUILD_TOOLS=OFF", + "-DLLVM_INCLUDE_TOOLS=OFF", "-DLLVM_BUILD_TOOLS=OFF", "-DLLVM_BUILD_UTILS=OFF", "-DCLANG_ENABLE_CLANGD=OFF", @@ -86,6 +87,7 @@ package("llvm") "-DLLVM_ENABLE_RTTI=OFF", -- "-DLLVM_ENABLE_PROJECTS=clang", + "-DLLVM_PARALLEL_LINK_JOBS=1", } local build_type = { @@ -105,7 +107,7 @@ package("llvm") table.insert(configs, "-DCMAKE_C_COMPILER=clang-cl") table.insert(configs, "-DCMAKE_CXX_COMPILER=clang-cl") end - if package:is_debug() then + if package:config("mode") == "debug" then table.insert(configs, "-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra") table.insert(configs, "-DLLVM_ENABLE_RUNTIMES=compiler-rt") table.insert(configs, "-DLLVM_USE_SANITIZER=Address") From 3937f333ae9d9137b0225e1b9f74eeed5699016f Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 31 Oct 2025 11:24:44 +0800 Subject: [PATCH 10/13] remove LLVM_INCLUDE_TOOLS --- xmake.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake.lua b/xmake.lua index 15205ab..2165899 100644 --- a/xmake.lua +++ b/xmake.lua @@ -74,7 +74,7 @@ package("llvm") "-DLLVM_INCLUDE_BENCHMARKS=OFF", -- "-DCLANG_BUILD_TOOLS=OFF", - "-DLLVM_INCLUDE_TOOLS=OFF", + -- "-DLLVM_INCLUDE_TOOLS=OFF", "-DLLVM_BUILD_TOOLS=OFF", "-DLLVM_BUILD_UTILS=OFF", "-DCLANG_ENABLE_CLANGD=OFF", From 2618381c520d728cf4e4bdc3b71b78a24c93eb09 Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 31 Oct 2025 20:16:50 +0800 Subject: [PATCH 11/13] try CMAKE_JOB_POOL_LINK --- xmake.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmake.lua b/xmake.lua index 2165899..23d5169 100644 --- a/xmake.lua +++ b/xmake.lua @@ -88,6 +88,8 @@ package("llvm") -- "-DLLVM_ENABLE_PROJECTS=clang", "-DLLVM_PARALLEL_LINK_JOBS=1", + -- Build job and link job together will oom + "-DCMAKE_JOB_POOL_LINK=console", } local build_type = { From cc1142c5eb16125211826ac110d1577df5940555 Mon Sep 17 00:00:00 2001 From: ykiko Date: Fri, 31 Oct 2025 23:02:15 +0800 Subject: [PATCH 12/13] Add swap file. --- .github/workflows/linux.yml | 18 +++++++++++++++ xmake.lua | 45 +++++++++++++++++-------------------- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1c38e37..7d0bdc0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -40,6 +40,24 @@ jobs: xmake-version: '2.9.9' actions-cache-folder: '.xmake-cache' + - name: Increase Swap Space + run: | + echo "===== Initial Status =====" + sudo swapon --show + free -h + + echo "===== Creating Swap File =====" + sudo swapoff -a + sudo fallocate -l 32G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + + echo "===== Final Status =====" + sudo swapon --show + free -h + df -h + - name: Package run: | xmake config --yes --verbose --toolchain=clang-20 --mode=${{ matrix.build_type }} --policies=build.optimization.lto:${{ matrix.lto }} diff --git a/xmake.lua b/xmake.lua index 23d5169..f5a368a 100644 --- a/xmake.lua +++ b/xmake.lua @@ -15,11 +15,12 @@ local sparse_checkout_list = { "clang", "clang-tools-extra", } --- Enable asan -if is_mode("debug") then - table.insert(sparse_checkout_list, "runtimes") - table.insert(sparse_checkout_list, "compiler-rt") -end + +-- TODO: If we need compiler-rt builtin-headers, then we need to enable them. +-- if is_mode("debug") then +-- table.insert(sparse_checkout_list, "runtimes") +-- table.insert(sparse_checkout_list, "compiler-rt") +-- end package("llvm") add_urls("https://github.com/llvm/llvm-project.git", {alias = "git", includes = sparse_checkout_list}) @@ -86,10 +87,15 @@ package("llvm") "-DLLVM_LINK_LLVM_DYLIB=OFF", "-DLLVM_ENABLE_RTTI=OFF", - -- "-DLLVM_ENABLE_PROJECTS=clang", "-DLLVM_PARALLEL_LINK_JOBS=1", + -- Build job and link job together will oom "-DCMAKE_JOB_POOL_LINK=console", + + "-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra", + + -- Only build native target + "-DLLVM_TARGETS_TO_BUILD=Native" } local build_type = { @@ -100,30 +106,21 @@ package("llvm") table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (build_type[package:config("mode")])) table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) table.insert(configs, "-DLLVM_ENABLE_LTO=" .. (package:config("lto") and "ON" or "OFF")) - if package:config("lto") then - if package:is_plat("linux", "macosx") then - table.insert(configs, "-DLLVM_USE_LINKER=lld") - end - end - if package:is_plat("windows") then - table.insert(configs, "-DCMAKE_C_COMPILER=clang-cl") - table.insert(configs, "-DCMAKE_CXX_COMPILER=clang-cl") - end + if package:config("mode") == "debug" then - table.insert(configs, "-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra") - table.insert(configs, "-DLLVM_ENABLE_RUNTIMES=compiler-rt") table.insert(configs, "-DLLVM_USE_SANITIZER=Address") - else - table.insert(configs, "-DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra") end - if package:is_plat("macosx") then - table.insert(configs, "-DLLVM_ENABLE_LIBCXX=ON") - table.insert(configs, "-DLLVM_TARGETS_TO_BUILD=AArch64") + if package:is_plat("windows") then + table.insert(configs, "-DCMAKE_C_COMPILER=clang-cl") + table.insert(configs, "-DCMAKE_CXX_COMPILER=clang-cl") + elseif package:is_plat("linux") then + table.insert(configs, "-DLLVM_USE_LINKER=lld") + elseif package:is_plat("macosx") then table.insert(configs, "-DCMAKE_OSX_ARCHITECTURES=arm64") table.insert(configs, "-DCMAKE_LIBTOOL=/opt/homebrew/opt/llvm@20/bin/llvm-libtool-darwin") - else - table.insert(configs, "-DLLVM_TARGETS_TO_BUILD=X86") + table.insert(configs, "-DLLVM_USE_LINKER=lld") + table.insert(configs, "-DLLVM_ENABLE_LIBCXX=ON") end local opt = {} From 47aa93cb1eac3681a7ec3cff1a66cafac2c5cff5 Mon Sep 17 00:00:00 2001 From: ykiko Date: Sat, 1 Nov 2025 10:06:48 +0800 Subject: [PATCH 13/13] Turn off lto releasedbg temporarily. --- .github/workflows/linux.yml | 18 +++++++++--------- .github/workflows/macos.yml | 18 ++++-------------- .github/workflows/windows.yml | 12 ++++++------ xmake.lua | 1 + 4 files changed, 20 insertions(+), 29 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7d0bdc0..b77f6cb 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -2,7 +2,7 @@ name: linux on: pull_request: - branches: [ main ] + branches: [main] jobs: build: @@ -14,8 +14,8 @@ jobs: lto: "n" - build_type: releasedbg lto: "n" - - build_type: releasedbg - lto: "y" + # - build_type: releasedbg + # lto: "y" concurrency: group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-linux-${{ matrix.build_type }}-${{ matrix.lto }} @@ -37,8 +37,8 @@ jobs: - name: Setup xmake uses: xmake-io/github-action-setup-xmake@v1 with: - xmake-version: '2.9.9' - actions-cache-folder: '.xmake-cache' + xmake-version: "2.9.9" + actions-cache-folder: ".xmake-cache" - name: Increase Swap Space run: | @@ -48,10 +48,10 @@ jobs: echo "===== Creating Swap File =====" sudo swapoff -a - sudo fallocate -l 32G /swapfile - sudo chmod 600 /swapfile - sudo mkswap /swapfile - sudo swapon /swapfile + sudo fallocate -l 16G /mnt/swapfile + sudo chmod 600 /mnt/swapfile + sudo mkswap /mnt/swapfile + sudo swapon /mnt/swapfile echo "===== Final Status =====" sudo swapon --show diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d7c5f66..99ea8b8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -2,7 +2,7 @@ name: macos on: pull_request: - branches: [ main ] + branches: [main] jobs: build: @@ -14,8 +14,8 @@ jobs: lto: "n" - build_type: releasedbg lto: "n" - - build_type: releasedbg - lto: "y" + # - build_type: releasedbg + # lto: "y" concurrency: group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-macos-${{ matrix.build_type }}-${{ matrix.lto }} @@ -24,11 +24,7 @@ jobs: steps: - name: Setup llvm run: | - brew install llvm@20 - - - name: Install lld - run: | - brew install lld@20 + brew install llvm@20 lld@20 - name: Setup python run: | @@ -43,12 +39,6 @@ jobs: run: | brew install xmake - # - name: Setup xmake - # uses: xmake-io/github-action-setup-xmake@v1 - # with: - # xmake-version: '2.9.9' - # actions-cache-folder: '.xmake-cache' - - name: Package run: | export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 89ab41f..b9ff876 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -2,7 +2,7 @@ name: windows on: pull_request: - branches: [ main ] + branches: [main] jobs: build: @@ -13,9 +13,9 @@ jobs: - build_type: releasedbg runtimes: MD lto: "n" - - build_type: releasedbg - runtimes: MT - lto: "y" + # - build_type: releasedbg + # runtimes: MT + # lto: "y" concurrency: group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-windows-${{ matrix.build_type }}-${{ matrix.lto }} @@ -28,8 +28,8 @@ jobs: - name: Setup xmake uses: xmake-io/github-action-setup-xmake@v1 with: - xmake-version: '2.9.9' - actions-cache-folder: '.xmake-cache' + xmake-version: "2.9.9" + actions-cache-folder: ".xmake-cache" - name: Package run: | diff --git a/xmake.lua b/xmake.lua index f5a368a..1d72afe 100644 --- a/xmake.lua +++ b/xmake.lua @@ -116,6 +116,7 @@ package("llvm") table.insert(configs, "-DCMAKE_CXX_COMPILER=clang-cl") elseif package:is_plat("linux") then table.insert(configs, "-DLLVM_USE_LINKER=lld") + -- table.insert(configs, "-DLLVM_USE_SPLIT_DWARF=ON") elseif package:is_plat("macosx") then table.insert(configs, "-DCMAKE_OSX_ARCHITECTURES=arm64") table.insert(configs, "-DCMAKE_LIBTOOL=/opt/homebrew/opt/llvm@20/bin/llvm-libtool-darwin")