aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-03-21 19:39:35 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-03-21 19:52:15 +0300
commit166889b52cda6080ceb0ea8def1b77c5f8bde9b6 (patch)
treefd0b3ae712b824fdd35b50c80dd37d3773cb446d /build
parentaa70be1f69ca5d9eaf6380a95f0d79c30f6ec691 (diff)
downloadydb-166889b52cda6080ceb0ea8def1b77c5f8bde9b6.tar.gz
Use clang14 in LLVM_BC by default
It looks like every project was switched to llvm14 or newer ([codesearch query](https://a.yandex-team.ru/search?search=LLVM_BC%2814%257C%255Cb%29%2Cya.make%2C%2Carcadia%2C%2C200)). 0731af77758492a3905c835e8af06091a05d7a5a
Diffstat (limited to 'build')
-rw-r--r--build/platform/clang/clang11.json16
-rw-r--r--build/platform/clang/ya.make4
-rw-r--r--build/ymake.core.conf25
3 files changed, 4 insertions, 41 deletions
diff --git a/build/platform/clang/clang11.json b/build/platform/clang/clang11.json
deleted file mode 100644
index 3a15e9c1b9..0000000000
--- a/build/platform/clang/clang11.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "by_platform": {
- "darwin-arm64": {
- "uri": "sbr:2214720943"
- },
- "darwin-x86_64": {
- "uri": "sbr:2214542408"
- },
- "linux-x86_64": {
- "uri": "sbr:1886578148"
- },
- "win32-x86_64": {
- "uri": "sbr:2062930743"
- }
- }
-}
diff --git a/build/platform/clang/ya.make b/build/platform/clang/ya.make
index 45a171cdea..7f99cd1009 100644
--- a/build/platform/clang/ya.make
+++ b/build/platform/clang/ya.make
@@ -1,11 +1,7 @@
RESOURCES_LIBRARY()
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG11 clang11.json)
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG14 clang14.json)
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG16 clang16.json)
-IF (NOT OPENSOURCE)
- DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG12 clang12.json)
-ENDIF()
# This is the default clang to be used in llvm-version-independent cases
DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(CLANG clang14.json)
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index d8b88bb3f3..38a661010c 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -4655,37 +4655,20 @@ macro CTEMPLATE_VARNAMES(File) {
}
LLVM_OPTS=
-CLANG_BC_ROOT=${CLANG11_RESOURCE_GLOBAL}
-CLANG_BC_EXTRA=/std:c++latest
-
-macro USE_LLVM_BC12() {
- SET(CLANG_BC_ROOT ${CLANG12_RESOURCE_GLOBAL})
-}
+CLANG_BC_ROOT=${CLANG14_RESOURCE_GLOBAL}
macro USE_LLVM_BC14() {
SET(CLANG_BC_ROOT ${CLANG14_RESOURCE_GLOBAL})
- SET(CLANG_BC_EXTRA /std:c++20)
}
macro USE_LLVM_BC16() {
SET(CLANG_BC_ROOT ${CLANG16_RESOURCE_GLOBAL})
- SET(CLANG_BC_EXTRA /std:c++20)
}
CLANG_DEFAULT_ROOT=${CLANG_RESOURCE_GLOBAL}
CLANG_C_COMPILER_BIN=${CLANG_RESOURCE_GLOBAL}/bin/clang
CLANG_CPP_COMPILER_BIN=${CLANG_RESOURCE_GLOBAL}/bin/clang++
-CLANG_EMIT_EXTRA_OPTS=
-
-when ($OS_WINDOWS == "yes") {
- # we can't use c++latest for clang14 now
- # so we set c++20 for it
- # for clang11 (actual clang for CLANG_EMIT_AST_CXX and LLVM_COMPILE_* macroses) /std:c++20 provokes "unused-command-line-argument" error
- # !do not forget to change this flag when updating build/platform/clang
- CLANG_EMIT_EXTRA_OPTS+=$CLANG_BC_EXTRA
-}
-
when ($OS_ANDROID == "yes") {
# We use clang shipped with android-ndk which has different layout
CLANG_DEFAULT_ROOT=$CLANG_ANDROID_RESOURCE_GLOBAL
@@ -4713,7 +4696,7 @@ macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
### Emit LLVM bytecode from .cpp file. BC_CXXFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts $CLANG_EMIT_EXTRA_OPTS ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
.SEM=llvm_compile_cxx ${input:Input} ${noauto;output:Output} ${"${CLANGPLUSPLUS}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm ${Opts}
PEERDIR(build/platform/clang)
}
@@ -4723,7 +4706,7 @@ macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
### Emit LLVM bytecode from .c file. BC_CFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_C(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts $CLANG_EMIT_EXTRA_OPTS ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
.SEM=llvm_compile_c ${input:Input} ${noauto;output:Output} ${"${CLANGC}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm ${Opts}
PEERDIR(build/platform/clang)
}
@@ -4733,7 +4716,7 @@ macro LLVM_COMPILE_C(Input, Output, Opts...) {
### Emit eBPF bytecode from .c file.
### Note: Output name is used as is, no extension added.
macro BPF(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_C_COMPILER_BIN} ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${noauto;output:Output} $Opts $CLANG_EMIT_EXTRA_OPTS ${kv;hide:"p BP"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_C_COMPILER_BIN} ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${noauto;output:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}