aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-02 19:10:03 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-02 19:10:03 +0300
commita83b14ce01c92d79d7ec39f4f49a192e078475cf (patch)
treee7cc6225959b162354689e8e07ffbbf2f08025a9
parent2039448f7dd2c66209c9dea19025929ba7e89ca4 (diff)
downloadydb-a83b14ce01c92d79d7ec39f4f49a192e078475cf.tar.gz
intermediate changes
ref:8e27ea81821c30096fd7fa0c707158968b9379ae
-rw-r--r--build/platform/clang/ya.make8
-rw-r--r--build/rules/contrib_restricted.policy2
-rw-r--r--build/sysincl/misc-win.yml24
-rw-r--r--build/ymake.core.conf22
4 files changed, 46 insertions, 10 deletions
diff --git a/build/platform/clang/ya.make b/build/platform/clang/ya.make
index a3b38947fb..c755e421ae 100644
--- a/build/platform/clang/ya.make
+++ b/build/platform/clang/ya.make
@@ -10,4 +10,12 @@ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
sbr:2062930743 FOR WIN32
)
+IF (OS_ANDROID)
+ DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
+ CLANG_ANDROID # Clang 12
+ sbr:2554889297 FOR LINUX
+ sbr:2554895399 FOR DARWIN
+)
+ENDIF()
+
END()
diff --git a/build/rules/contrib_restricted.policy b/build/rules/contrib_restricted.policy
index a83ead1904..d00b6c5480 100644
--- a/build/rules/contrib_restricted.policy
+++ b/build/rules/contrib_restricted.policy
@@ -153,7 +153,7 @@ ALLOW yabs/telephony -> contrib/restricted/boost
ALLOW yandex_io -> contrib/restricted/boost
ALLOW yweb/robot/js -> contrib/restricted/boost
ALLOW market/access/server/env -> contrib/restricted/boost
-ALLOW sdg/library/cpp/ros_msg_parser -> contrib/restricted/boost
+ALLOW sdg/sdc -> contrib/restricted/boost
ALLOW search/meta/scatter/ant -> contrib/restricted/boost
ALLOW search/meta/scatter/ut -> contrib/restricted/boost
diff --git a/build/sysincl/misc-win.yml b/build/sysincl/misc-win.yml
index e53d4be782..fe4f94c673 100644
--- a/build/sysincl/misc-win.yml
+++ b/build/sysincl/misc-win.yml
@@ -14,14 +14,30 @@
- source_filter: "^contrib/libs/libpq/src"
includes:
- arpa/inet.h: contrib/libs/libpq/src/include/port/win32/arpa/inet.h
+ - netdb.h: contrib/libs/libpq/src/include/port/win32/netdb.h
+ - netinet/in.h: contrib/libs/libpq/src/include/port/win32/netinet/in.h
+ - pwd.h: contrib/libs/libpq/src/include/port/win32/pwd.h
- sys/file.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h
- sys/param.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h
+ - sys/socket.h: contrib/libs/libpq/src/include/port/win32/sys/socket.h
- sys/time.h: contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h
- unistd.h: contrib/libs/libpq/src/include/port/win32_msvc/unistd.h
- - netdb.h: contrib/libs/libpq/src/include/port/win32/netdb.h
- - netinet/in.h: contrib/libs/libpq/src/include/port/win32/netinet/in.h
- - pwd.h: contrib/libs/libpq/src/include/port/win32/pwd.h
- - sys/socket.h: contrib/libs/libpq/src/include/port/win32/sys/socket.h
+
+- source_filer: "^contrib/libs/postgresql/src"
+ includes:
+ - arpa/inet.h: contrib/libs/postgresql/src/include/port/win32/arpa/inet.h
+ - dirent.h: contrib/libs/postgresql/src/include/port/win32_msvc/dirent.h
+ - grp.h: contrib/libs/postgresql/src/include/port/win32/grp.h
+ - netdb.h: contrib/libs/postgresql/src/include/port/win32/netdb.h
+ - netinet/in.h: contrib/libs/postgresql/src/include/port/win32/netinet/in.h
+ - pwd.h: contrib/libs/postgresql/src/include/port/win32/pwd.h
+ - sys/file.h: contrib/libs/postgresql/src/include/port/win32_msvc/sys/file.h
+ - sys/param.h: contrib/libs/postgresql/src/include/port/win32_msvc/sys/param.h
+ - sys/socket.h: contrib/libs/postgresql/src/include/port/win32/sys/socket.h
+ - sys/time.h: contrib/libs/postgresql/src/include/port/win32_msvc/sys/time.h
+ - sys/wait.h: contrib/libs/postgresql/src/include/port/win32/sys/wait.h
+ - unistd.h: contrib/libs/postgresql/src/include/port/win32_msvc/unistd.h
+ - utime.h: contrib/libs/postgresql/src/include/port/win32_msvc/utime.h
- source_filter: "^contrib/libs/libx264"
includes:
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 247d1baf5d..a6ec654732 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -408,6 +408,10 @@ macro NO_LTO() {
DISABLE(USE_THINLTO)
}
+when ($USE_LTO == "yes" && $OS_LINUX != "yes") {
+ FATAL_ERROR_MESSAGE+=lto is only supported for linux
+}
+
# tag:python-specific
YMAKE_PYTHON3_PEER=build/platform/python/ymake_python3
YMAKE_PYTHON3=$YMAKE_PYTHON3_RESOURCE_GLOBAL/python3
@@ -7317,6 +7321,14 @@ macro CTEMPLATE_VARNAMES(File) {
LLVM_OPTS=
CLANG_ROOT=$CLANG_RESOURCE_GLOBAL
+CLANG_CPP_COMPILER_BIN=$CLANG_ROOT/bin/clang++
+CLANG_C_COMPILER_BIN=$CLANG_ROOT/bin/clang
+
+when ($OS_ANDROID == "yes") {
+ CLANG_ROOT=$CLANG_ANDROID_RESOURCE_GLOBAL
+ CLANG_CPP_COMPILER_BIN=$CLANG_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++
+ CLANG_C_COMPILER_BIN=$CLANG_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
+}
### @usage: GENERATED_SRCS(srcs... PARSE_META_FROM cpp_srcs... [OUTPUT_INCLUDES output_includes...] [OPTIONS])
###
@@ -7350,7 +7362,7 @@ macro GENERATED_SRCS(PARSE_META_FROM{input}[], OUTPUT_INCLUDES[], OPTIONS[], TEM
### Emit Clang AST from .cpp file. CXXFLAGS and LLVM_OPTS are passed in, while CFLAGS and C_FLAGS_PLATFORM are not.
### Note: Output name is used as is, no extension added.
macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang++ ${pre=-I:_C__INCLUDE} $CXXFLAGS -Wno-unknown-warning-option $LLVM_OPTS -emit-ast -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p ST"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_CPP_COMPILER_BIN ${pre=-I:_C__INCLUDE} $CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS -emit-ast -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p ST"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}
@@ -7359,7 +7371,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_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 ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_CPP_COMPILER_BIN ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
.SEM=llvm_compile_cxx ${input:Input} ${output;noauto:Output} ${CLANGPLUSPLUS} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm ${Opts}
PEERDIR(build/platform/clang)
}
@@ -7369,7 +7381,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_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_C_COMPILER_BIN ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BC"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}
@@ -7378,7 +7390,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_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${output;noauto:Output} $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 ${output;noauto:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"}
PEERDIR(build/platform/clang)
}
@@ -7387,7 +7399,7 @@ macro BPF(Input, Output, Opts...) {
### Emit eBPF bytecode from .c file.
### Note: Output name is used as is, no extension added.
macro BPF_STATIC(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS $CLANG_ROOT/bin/clang ${pre=-I:_C__INCLUDE} $C_FLAGS_PLATFORM -target bpf -c ${input:Input} -o ${output;noauto:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"} && ${cwd:BINDIR} $LLD_ROOT_RESOURCE_GLOBAL/ld -r -b binary -m elf_x86_64 -o ${output;noauto;suf=.bpf.o:Input} ${noauto;nopath:Output}
+ .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 ${output;noauto:Output} $Opts ${kv;hide:"p BP"} ${kv;hide:"pc light-green"} && ${cwd:BINDIR} $LLD_ROOT_RESOURCE_GLOBAL/ld -r -b binary -m elf_x86_64 -o ${output;noauto;suf=.bpf.o:Input} ${noauto;nopath:Output}
PEERDIR(build/platform/clang build/platform/lld)
}