From a332c53755bc6990775c3fdccc0d679658e25364 Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Fri, 1 Mar 2024 18:27:07 +0800 Subject: [PATCH 1/3] build: Bump compilation toolchain --- settings.bzl | 6 ++---- setup_llvm.bzl | 10 ++++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/settings.bzl b/settings.bzl index d1e5440c..3fe74746 100644 --- a/settings.bzl +++ b/settings.bzl @@ -1,7 +1,5 @@ # Keep LLVM versions list in sync with setup_llvm.bzl ASAN_LINKOPTS = [ - "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/15.0.6/lib/darwin", - # macOS release builds use 15.0.7 for x86_64 - "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/15.0.7/lib/darwin", - "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/15.0.6/lib/linux", + "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/17.0.6/lib/darwin", + "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/17.0.6/lib/linux", ] diff --git a/setup_llvm.bzl b/setup_llvm.bzl index 42ab79a0..5f5f4e14 100644 --- a/setup_llvm.bzl +++ b/setup_llvm.bzl @@ -4,12 +4,10 @@ def setup_llvm_toolchain(name): # NOTE: The ASan build uses paths which involve the version. # Keep the version list in sync with settings.bzl mapping = { - "linux-aarch64": {"version": "15.0.6", "triple": "aarch64-linux-gnu", "sha256": "8ca4d68cf103da8331ca3f35fe23d940c1b78fb7f0d4763c1c059e352f5d1bec"}, - "linux-x86_64": {"version": "15.0.6", "triple": "x86_64-linux-gnu-ubuntu-18.04", "sha256": "38bc7f5563642e73e69ac5626724e206d6d539fbef653541b34cae0ba9c3f036"}, - "darwin-aarch64": {"version": "15.0.6", "triple": "arm64-apple-darwin21.0", "sha256": "32bc7b8eee3d98f72dd4e5651e6da990274ee2d28c5c19a7d8237eb817ce8d91"}, - "darwin-arm64": {"version": "15.0.6", "triple": "arm64-apple-darwin21.0", "sha256": "32bc7b8eee3d98f72dd4e5651e6da990274ee2d28c5c19a7d8237eb817ce8d91"}, - "darwin-x86_64": {"version": "15.0.7", "triple": "x86_64-apple-darwin21.0", "sha256": "d16b6d536364c5bec6583d12dd7e6cf841b9f508c4430d9ee886726bd9983f1c"}, - "windows": {"version": "15.0.6", "sha256": "22e2f2c38be4c44db7a1e9da5e67de2a453c5b4be9cf91e139592a63877ac0a2", "url": "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.6/LLVM-15.0.6-win64.exe"}, + "linux-aarch64": {"version": "17.0.6", "triple": "aarch64-linux-gnu", "sha256": "6dd62762285326f223f40b8e4f2864b5c372de3f7de0731cb7cd55ca5287b75a"}, + "linux-x86_64": {"version": "17.0.6", "triple": "x86_64-linux-gnu-ubuntu-22.04", "sha256": "884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3"}, + "darwin-aarch64": {"version": "17.0.6", "triple": "arm64-apple-darwin22.0", "sha256": "1264eb3c2a4a6d5e9354c3e5dc5cb6c6481e678f6456f36d2e0e566e9400fcad"}, + "darwin-arm64": {"version": "17.0.6", "triple": "arm64-apple-darwin22.0", "sha256": "1264eb3c2a4a6d5e9354c3e5dc5cb6c6481e678f6456f36d2e0e566e9400fcad"}, } llvm_versions, sha256, strip_prefix, urls = {}, {}, {}, {} for (k, v) in mapping.items(): From 8a5431fdfa1aff34b31e6396c4490e8e1d688b6a Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Fri, 1 Mar 2024 19:12:05 +0800 Subject: [PATCH 2/3] build: Downgrade LLVM 17.0.6 -> 16.0.0 --- settings.bzl | 4 ++-- setup_llvm.bzl | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/settings.bzl b/settings.bzl index 3fe74746..b53e0da1 100644 --- a/settings.bzl +++ b/settings.bzl @@ -1,5 +1,5 @@ # Keep LLVM versions list in sync with setup_llvm.bzl ASAN_LINKOPTS = [ - "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/17.0.6/lib/darwin", - "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/17.0.6/lib/linux", + "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/16.0.0/lib/darwin", + "-Wl,-rpath,@loader_path/../../../../../../external/llvm_toolchain_llvm/lib/clang/16.0.0/lib/linux", ] diff --git a/setup_llvm.bzl b/setup_llvm.bzl index 5f5f4e14..724ee7f5 100644 --- a/setup_llvm.bzl +++ b/setup_llvm.bzl @@ -3,11 +3,19 @@ load("@toolchains_llvm//toolchain:rules.bzl", grailbio_llvm_toolchain = "llvm_to def setup_llvm_toolchain(name): # NOTE: The ASan build uses paths which involve the version. # Keep the version list in sync with settings.bzl + # At the time of bumping this, the latest version is 17.0.6, + # but we use 16.0.0 because: + # - Versions later than 16.0.0 are built on Ubuntu 22.04 or newer, + # whereas 16.0.0 is built on Ubuntu 18.04. The newer binaries require + # a newer glibc version which isn't currently present on Buildkite machines. + # - Our release pipeline uses Ubuntu 18.04 so that the binaries work on + # older Debian and Ubuntu versions. Using newer toolchain binaries would + # hence not work in our release pipeline. mapping = { - "linux-aarch64": {"version": "17.0.6", "triple": "aarch64-linux-gnu", "sha256": "6dd62762285326f223f40b8e4f2864b5c372de3f7de0731cb7cd55ca5287b75a"}, - "linux-x86_64": {"version": "17.0.6", "triple": "x86_64-linux-gnu-ubuntu-22.04", "sha256": "884ee67d647d77e58740c1e645649e29ae9e8a6fe87c1376be0f3a30f3cc9ab3"}, - "darwin-aarch64": {"version": "17.0.6", "triple": "arm64-apple-darwin22.0", "sha256": "1264eb3c2a4a6d5e9354c3e5dc5cb6c6481e678f6456f36d2e0e566e9400fcad"}, - "darwin-arm64": {"version": "17.0.6", "triple": "arm64-apple-darwin22.0", "sha256": "1264eb3c2a4a6d5e9354c3e5dc5cb6c6481e678f6456f36d2e0e566e9400fcad"}, + "linux-aarch64": {"version": "16.0.0", "triple": "aarch64-linux-gnu", "sha256": "b750ba3120e6153fc5b316092f19b52cf3eb64e19e5f44bd1b962cb54a20cf0a"}, + "linux-x86_64": {"version": "16.0.0", "triple": "x86_64-linux-gnu-ubuntu-18.04", "sha256": "2b8a69798e8dddeb57a186ecac217a35ea45607cb2b3cf30014431cff4340ad1"}, + "darwin-aarch64": {"version": "16.0.0", "triple": "arm64-apple-darwin22.0", "sha256": "2041587b90626a4a87f0de14a5842c14c6c3374f42c8ed12726ef017416409d9"}, + "darwin-arm64": {"version": "16.0.0", "triple": "arm64-apple-darwin22.0", "sha256": "2041587b90626a4a87f0de14a5842c14c6c3374f42c8ed12726ef017416409d9"}, } llvm_versions, sha256, strip_prefix, urls = {}, {}, {}, {} for (k, v) in mapping.items(): From 0028f3c47a6caba01a081d50e0bdf5b18804c60b Mon Sep 17 00:00:00 2001 From: Varun Gandhi Date: Wed, 6 Mar 2024 09:15:28 +0800 Subject: [PATCH 3/3] Reformat --- indexer/Driver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indexer/Driver.cc b/indexer/Driver.cc index c8872bb6..2b60aa7d 100644 --- a/indexer/Driver.cc +++ b/indexer/Driver.cc @@ -231,8 +231,8 @@ struct DriverOptions { projectRootPath(AbsolutePath("/"), RootKind::Project), compdbPath(), indexOutputPath(), statsFilePath(), packageMapPath(), showCompilerDiagnostics(cliOpts.showCompilerDiagnostics), - showProgress(cliOpts.showProgress), ipcOptions{cliOpts.ipcSizeHintBytes, - cliOpts.receiveTimeout}, + showProgress(cliOpts.showProgress), + ipcOptions{cliOpts.ipcSizeHintBytes, cliOpts.receiveTimeout}, numWorkers(cliOpts.numWorkers), deterministic(cliOpts.deterministic), preprocessorRecordHistoryFilterRegex( cliOpts.preprocessorRecordHistoryFilterRegex),