# HG changeset patch # User Nathan Froyd # Date 1538059828 14400 # Node ID 95a1ec5402c06387e1d5eb64e56f804c8da9aa0f # Parent 80e6c958c849f9b972481564c82a5f39b0a272e5 Bug 1494384 - fix aarch64 __va_start checking in clang; r=dmajor We need this so we can get a libclang to use for AArch64 bindgen. diff --git a/build/build-clang/aarch64-vastart-checking.patch b/build/build-clang/aarch64-vastart-checking.patch new file mode 100644 --- /dev/null +++ b/build/build-clang/aarch64-vastart-checking.patch @@ -0,0 +1,16 @@ +AArch64 Windows uses a five-argument __va_start, just like ARM. + +https://bugs.llvm.org/show_bug.cgi?id=39090 + +diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp +index 22483f8..53d9cb2 100644 +--- a/clang/lib/Sema/SemaChecking.cpp ++++ b/clang/lib/Sema/SemaChecking.cpp +@@ -917,6 +917,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, + switch (Context.getTargetInfo().getTriple().getArch()) { + case llvm::Triple::arm: + case llvm::Triple::thumb: ++ case llvm::Triple::aarch64: + if (SemaBuiltinVAStartARMMicrosoft(TheCall)) + return ExprError(); + break; diff --git a/build/build-clang/clang-win32-st-an.json b/build/build-clang/clang-win32-st-an.json --- a/build/build-clang/clang-win32-st-an.json +++ b/build/build-clang/clang-win32-st-an.json @@ -11,11 +11,12 @@ "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/trunk", "python_path": "c:/mozilla-build/python/python.exe", "cc": "cl.exe", "cxx": "cl.exe", "patches": [ "r318309.patch", "r320462.patch", "msvc-host-x64.patch", + "aarch64-vastart-checking.patch", "loosen-msvc-detection.patch" ] } diff --git a/build/build-clang/clang-win64-st-an.json b/build/build-clang/clang-win64-st-an.json --- a/build/build-clang/clang-win64-st-an.json +++ b/build/build-clang/clang-win64-st-an.json @@ -13,11 +13,12 @@ "cc": "cl.exe", "cxx": "cl.exe", "ml": "ml64.exe", "patches": [ "r318309.patch", "r320462.patch", "r327876.patch", "loosen-msvc-detection.patch", + "aarch64-vastart-checking.patch", "fflush-before-unlocking.patch" ] } diff --git a/build/build-clang/clang-win64.json b/build/build-clang/clang-win64.json --- a/build/build-clang/clang-win64.json +++ b/build/build-clang/clang-win64.json @@ -13,11 +13,12 @@ "cc": "cl.exe", "cxx": "cl.exe", "ml": "ml64.exe", "patches": [ "workaround-issue38586.patch", "r342649-hotpatch-8-byte-nops.patch", "r342652-unpoison-thread-stacks.patch", "r343123-pin-asan-dll.patch", + "aarch64-vastart-checking.patch", "loosen-msvc-detection.patch" ] }