Skip to content

Commit bbb0693

Browse files
konistehradtritao
authored andcommitted
Enable ARM64 support on LLVM builds
1 parent b5ab95e commit bbb0693

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.github/workflows/llvm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ jobs:
1010
matrix:
1111
config:
1212
- { os: ubuntu-22.04, platform: x64, cxx: g++-11, cc: gcc-11 }
13+
- { os: ubuntu-22.04, platform: arm64, cxx: g++-11, cc: gcc-11 }
1314
- { os: macos-11, platform: x64, cxx: clang++, cc: clang }
1415
- { os: macos-12, platform: x64, cxx: clang++, cc: clang }
16+
- { os: macos-12, platform: arm64, cxx: clang++, cc: clang }
1517

1618
runs-on: ${{ matrix.config.os }}
1719

build/Helpers.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ newoption {
1010
allowed = {
1111
{ "x86", "x86 32-bits" },
1212
{ "x64", "x64 64-bits" },
13+
{ "arm64","ARM64 64-bits" },
1314
}
1415
}
1516

@@ -251,11 +252,15 @@ function AddPlatformSpecificFiles(folder, filename)
251252
filter { "toolset:msc*", "architecture:x86" }
252253
files { path.join(folder, "i686-pc-win32-msvc", filename) }
253254
elseif os.istarget("macosx") then
255+
filter { "architecture:arm64" }
256+
files { path.join(folder, "arm64-apple-darwin12.4.0", filename) }
254257
filter { "architecture:x86_64" }
255258
files { path.join(folder, "x86_64-apple-darwin12.4.0", filename) }
256259
filter {"architecture:x86" }
257260
files { path.join(folder, "i686-apple-darwin12.4.0", filename) }
258261
elseif os.istarget("linux") then
262+
filter { "architecture:arm64" }
263+
files { path.join(folder, "arm64-linux-gnu" .. (UseCxx11ABI() and "-cxx11abi" or ""), filename) }
259264
filter { "architecture:x86_64" }
260265
files { path.join(folder, "x86_64-linux-gnu" .. (UseCxx11ABI() and "-cxx11abi" or ""), filename) }
261266
else

build/LLVM.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ function SetupLLVMLibs()
172172
"LLVMX86CodeGen",
173173
"LLVMX86Desc",
174174
"LLVMX86Info",
175+
"LLVMAArch64AsmParser",
176+
"LLVMAArch64CodeGen",
177+
"LLVMAArch64Desc",
178+
"LLVMAArch64Disassembler",
179+
"LLVMAArch64Info",
180+
"LLVMAArch64Utils",
175181
"LLVMipo",
176182
"LLVMInstrumentation",
177183
"LLVMVectorize",

build/llvm/LLVM.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function cmake(gen, conf, builddir, options)
254254
.. ' -DLLVM_ENABLE_ZSTD=false'
255255
.. ' -DLLVM_INCLUDE_DOCS=false'
256256
.. ' -DLLVM_INCLUDE_EXAMPLES=false'
257-
.. ' -DLLVM_TARGETS_TO_BUILD="X86"'
257+
.. ' -DLLVM_TARGETS_TO_BUILD="X86;AArch64"'
258258
.. ' -DLLVM_TOOL_BUGPOINT_BUILD=false'
259259
.. ' -DLLVM_TOOL_BUGPOINT_PASSES_BUILD=false'
260260
.. ' -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=false'

0 commit comments

Comments
 (0)