Enable ARM64 support on LLVM builds

This commit is contained in:
Conrad Kreyling 2024-02-02 13:35:11 -05:00
Родитель b5ab95e11d
Коммит c880be445c
4 изменённых файлов: 14 добавлений и 1 удалений

2
.github/workflows/llvm.yml поставляемый
Просмотреть файл

@ -10,8 +10,10 @@ jobs:
matrix:
config:
- { os: ubuntu-22.04, platform: x64, cxx: g++-11, cc: gcc-11 }
- { os: ubuntu-22.04, platform: arm64, cxx: g++-11, cc: gcc-11 }
- { os: macos-11, platform: x64, cxx: clang++, cc: clang }
- { os: macos-12, platform: x64, cxx: clang++, cc: clang }
- { os: macos-12, platform: arm64, cxx: clang++, cc: clang }
runs-on: ${{ matrix.config.os }}

Просмотреть файл

@ -10,6 +10,7 @@ newoption {
allowed = {
{ "x86", "x86 32-bits" },
{ "x64", "x64 64-bits" },
{ "arm64","ARM64 64-bits" },
}
}
@ -251,11 +252,15 @@ function AddPlatformSpecificFiles(folder, filename)
filter { "toolset:msc*", "architecture:x86" }
files { path.join(folder, "i686-pc-win32-msvc", filename) }
elseif os.istarget("macosx") then
filter { "architecture:arm64" }
files { path.join(folder, "arm64-apple-darwin12.4.0", filename) }
filter { "architecture:x86_64" }
files { path.join(folder, "x86_64-apple-darwin12.4.0", filename) }
filter {"architecture:x86" }
files { path.join(folder, "i686-apple-darwin12.4.0", filename) }
elseif os.istarget("linux") then
filter { "architecture:arm64" }
files { path.join(folder, "arm64-linux-gnu" .. (UseCxx11ABI() and "-cxx11abi" or ""), filename) }
filter { "architecture:x86_64" }
files { path.join(folder, "x86_64-linux-gnu" .. (UseCxx11ABI() and "-cxx11abi" or ""), filename) }
else

Просмотреть файл

@ -172,6 +172,12 @@ function SetupLLVMLibs()
"LLVMX86CodeGen",
"LLVMX86Desc",
"LLVMX86Info",
"LLVMAArch64AsmParser",
"LLVMAArch64CodeGen",
"LLVMAArch64Desc",
"LLVMAArch64Disassembler",
"LLVMAArch64Info",
"LLVMAArch64Utils",
"LLVMipo",
"LLVMInstrumentation",
"LLVMVectorize",

Просмотреть файл

@ -254,7 +254,7 @@ function cmake(gen, conf, builddir, options)
.. ' -DLLVM_ENABLE_ZSTD=false'
.. ' -DLLVM_INCLUDE_DOCS=false'
.. ' -DLLVM_INCLUDE_EXAMPLES=false'
.. ' -DLLVM_TARGETS_TO_BUILD="X86"'
.. ' -DLLVM_TARGETS_TO_BUILD="X86;AArch64"'
.. ' -DLLVM_TOOL_BUGPOINT_BUILD=false'
.. ' -DLLVM_TOOL_BUGPOINT_PASSES_BUILD=false'
.. ' -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=false'