diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /build/conf | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'build/conf')
-rw-r--r-- | build/conf/compilers/gnu_compiler.conf | 420 | ||||
-rw-r--r-- | build/conf/compilers/msvc_compiler.conf | 270 | ||||
-rw-r--r-- | build/conf/docs.conf | 409 | ||||
-rw-r--r-- | build/conf/java.ymake.conf | 212 | ||||
-rw-r--r-- | build/conf/jbuild.ymake.conf | 124 | ||||
-rw-r--r-- | build/conf/license.conf | 398 | ||||
-rw-r--r-- | build/conf/linkers/ld.conf | 373 | ||||
-rw-r--r-- | build/conf/linkers/msvc_linker.conf | 271 | ||||
-rw-r--r-- | build/conf/opensource.conf | 54 | ||||
-rw-r--r-- | build/conf/project_specific/maps/aar.conf | 350 | ||||
-rw-r--r-- | build/conf/project_specific/maps/asrc.conf | 122 | ||||
-rw-r--r-- | build/conf/project_specific/maps/mapkit.conf | 283 | ||||
-rw-r--r-- | build/conf/project_specific/maps/sproto.conf | 21 | ||||
-rw-r--r-- | build/conf/project_specific/other.conf | 11 | ||||
-rw-r--r-- | build/conf/project_specific/yql_udf.conf | 266 | ||||
-rw-r--r-- | build/conf/rules.conf | 62 | ||||
-rw-r--r-- | build/conf/settings.conf | 162 | ||||
-rw-r--r-- | build/conf/sysincl.conf | 65 | ||||
-rw-r--r-- | build/conf/toolchains/gnu_toolchain.conf | 0 | ||||
-rw-r--r-- | build/conf/toolchains/msvc_toolchain.conf | 7 | ||||
-rw-r--r-- | build/conf/ts.conf | 149 |
21 files changed, 0 insertions, 4029 deletions
diff --git a/build/conf/compilers/gnu_compiler.conf b/build/conf/compilers/gnu_compiler.conf deleted file mode 100644 index 8bb05a134b..0000000000 --- a/build/conf/compilers/gnu_compiler.conf +++ /dev/null @@ -1,420 +0,0 @@ -_C_DEFINES_ANDROID= -_C_DEFINES_ANDROID_OTHERWISE= -when ($OS_ANDROID == "yes") { - _C_DEFINES_ANDROID=-DANDROID_FAKEID=$ANDROID_FAKEID -} -otherwise { - # There is no usable _FILE_OFFSET_BITS=64 support in Androids until API 21. And it's incomplete until at least API 24. - # https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md - # Arcadia have API 16 for 32-bit Androids. - _C_DEFINES_ANDROID_OTHERWISE=-D_FILE_OFFSET_BITS=64 -} - -_C_DEFINES_GNU_SOURCE= -when ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_CYGWIN == "yes") { - _C_DEFINES_GNU_SOURCE=-D_GNU_SOURCE -} - -_C_DEFINES_CLANG_LINUX_X86_64= -when ($CLANG == "yes" && $OS_LINUX == "yes" && $ARCH_X86_64 == "yes") { - _C_DEFINES_CLANG_LINUX_X86_64=-D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE -} - -_C_DEFINES_IOS= -when ($OS_IOS == "yes") { - _C_DEFINES_IOS=-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -} - -_C_DEFINES_WITH_VALGRIND= -when ($WITH_VALGRIND == "yes") { - _C_DEFINES_WITH_VALGRIND=-DWITH_VALGRIND=1 -} - -C_DEFINES =-DFAKEID=$CPP_FAKEID -C_DEFINES+=$_C_DEFINES_ANDROID -C_DEFINES+=\ - -DARCADIA_ROOT=${ARCADIA_ROOT} \ - -DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT} \ - -D_THREAD_SAFE \ - -D_PTHREADS \ - -D_REENTRANT \ - -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES \ - -D_LARGEFILE_SOURCE \ - -D__STDC_CONSTANT_MACROS \ - -D__STDC_FORMAT_MACROS -C_DEFINES+=$_C_DEFINES_ANDROID_OTHERWISE -C_DEFINES+=$_C_DEFINES_GNU_SOURCE -C_DEFINES+=$_C_DEFINES_CLANG_LINUX_X86_64 -C_DEFINES+=$_C_DEFINES_IOS -C_DEFINES+=$_C_DEFINES_WITH_VALGRIND -C_DEFINES+=$_C_DEFINES_NDEBUG - -_C_FOPTIONS_INIT_ARRAY= -when ($CLANG == "yes" && $OS_LINUX == "yes") { - # Use .init_array instead of .ctors (default for old clang versions) - # See: https://maskray.me/blog/2021-11-07-init-ctors-init-array - _C_FOPTIONS_INIT_ARRAY=-fuse-init-array -} - -_C_FOPTIONS_COLOR= -_C_FOPTIONS_ALIGNED_ALLOCATION= -when ($CLANG == "yes") { - # Set up output colorization - _C_FOPTIONS_COLOR=-fcolor-diagnostics - # Enable aligned allocation - _C_FOPTIONS_ALIGNED_ALLOCATION=-faligned-allocation -} -elsewhen ($GCC == "yes") { - # Set up output colorization - _C_FOPTIONS_COLOR=-fdiagnostics-color=always - # It looks like there is no way to enable aligned allocation in gcc -} - -_C_FOPTIONS_MAPSMOBI_ARM= -when ($OS_IOS == "yes") { - when ($MAPSMOBI_BUILD_TARGET == "yes" && $ARCH_ARM == "yes") { - _C_FOPTIONS_MAPSMOBI_ARM=-fembed-bitcode - } -} - -_C_WARNINGS_CLANG= -_CXX_WARNINGS_CLANG= -when ($CLANG == "yes") { - _CXX_WARNINGS_CLANG=\ - -Wimport-preprocessor-directive-pedantic \ - -Wno-ambiguous-reversed-operator \ - -Wno-defaulted-function-deleted \ - -Wno-deprecated-anon-enum-enum-conversion \ - -Wno-deprecated-enum-enum-conversion \ - -Wno-deprecated-enum-float-conversion \ - -Wno-deprecated-volatile \ - -Wno-pessimizing-move \ - -Wno-range-loop-construct \ - -Wno-return-std-move \ - -Wno-undefined-var-template - - # -Wno-unknown-warning-option - # For nvcc to accept the above. - _C_WARNINGS_CLANG=\ - -Wno-implicit-const-int-float-conversion \ - -Wno-unknown-warning-option -} - -_C_FOPTIONS_GCC= -when ($GCC == "yes") { - _C_FOPTIONS_GCC=-fno-delete-null-pointer-checks -fabi-version=8 -} - -_C_FOPTIONS_IOS= -when ($OS_IOS != "yes") { - # Split all functions and data into separate sections for DCE and ICF linker passes - # NOTE: iOS build uses -fembed-bitcode which conflicts with -ffunction-sections (only relevant for ELF targets) - _C_FOPTIONS_IOS=-ffunction-sections -fdata-sections -} - -_C_FOPTIONS_DEBUG= -when ($_BUILD_DEBUG == "yes") { - _C_FOPTIONS_DEBUG=$FSTACK -} - -_C_FLAGS_RELEASE= -_C_FOPTIONS_RELEASE= -_OPTIMIZE_RELEASE= -when ($_BUILD_RELEASE == "yes") { - _C_FLAGS_RELEASE=$OPTIMIZE - when ($_BUILD_SIZE_OPTIMIZED == "yes") { - # -Oz is clang's more size-aggressive version of -Os - # For ARM specifically, clang -Oz is on par with gcc -Os: - # https://github.com/android/ndk/issues/133#issuecomment-365763507 - when($CLANG == "yes") { - _OPTIMIZE_RELEASE=-Oz - } - otherwise { - _OPTIMIZE_RELEASE=-Os - } - - # Generate sections with address significance tables for ICF linker pass - when($CLANG == "yes") { - _C_FOPTIONS_RELEASE=-faddrsig - } - } - otherwise { - _OPTIMIZE_RELEASE=-O3 - } -} - -_C_FOPTIONS_PROFILER= -when ($_BUILD_PROFILER_TYPE != "") { - when ($_BUILD_PROFILER_TYPE in ["generic", "gprof"]) { - _C_FOPTIONS_PROFILER=-fno-omit-frame-pointer - } -} - -_C_FOPTIONS = - -# Enable C++ exceptions (and allow them to be throw through pure C code) -_C_FOPTIONS+=-fexceptions - -# Enable standard-conforming behavior and generate duplicate symbol error in case of duplicated global constants. -# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678#c0 -_C_FOPTIONS+=-fno-common - -_C_FOPTIONS+=$_C_FOPTIONS_INIT_ARRAY -_C_FOPTIONS+=$_C_FOPTIONS_COLOR -_C_FOPTIONS+=$_C_FOPTIONS_ALIGNED_ALLOCATION -_C_FOPTIONS+=$_C_FOPTIONS_MAPSMOBI_ARM -_C_FOPTIONS+=$_C_FOPTIONS_DEBUG -_C_FOPTIONS+=$_C_FOPTIONS_RELEASE -_C_FOPTIONS+=$_C_FOPTIONS_PROFILER -_C_FOPTIONS+=$_C_FOPTIONS_GCC -_C_FOPTIONS+=$_C_FOPTIONS_IOS - -# Enable default warnings subset -_C_WARNINGS =-Wall -Wextra - -# Disable some warnings which will fail compilation at the time -_C_WARNINGS+=-Wno-parentheses - -_C_WARNINGS+=$_C_WARNINGS_CLANG - -# Issue a warning if certain overload is hidden due to inheritance -_CXX_WARNINGS =-Woverloaded-virtual - -_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG - -_C_FLAGS_ARCH= -when ($ARCH_I386 == "yes") { - _C_FLAGS_ARCH=-m32 -} -when ($ARCH_X86_64 == "yes") { - _C_FLAGS_ARCH=-m64 -} - -_C_FLAGS_FAST_DEBUG= -when ($_BUILD_FAST_DEBUG == "yes") { - _C_FLAGS_FAST_DEBUG=-Og -} - -_C_DEFINES_NDEBUG=-UNDEBUG -when ($_BUILD_WITH_NDEBUG == "yes") { - _C_DEFINES_NDEBUG=-DNDEBUG -} - -_C_FLAGS_PROFILER= -when ($_BUILD_PROFILER_TYPE == "gprof") { - _C_FLAGS_PROFILER=-pg -} - -_C_FLAGS=\ -$CL_DEBUG_INFO $CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__ $_C_FLAGS_ARCH_OPT -pipe -_C_FLAGS+=$_C_FLAGS_ARCH -_C_FLAGS+=$_C_FLAGS_FAST_DEBUG -_C_FLAGS+=$_C_FLAGS_RELEASE -_C_FLAGS+=$_C_FLAGS_PROFILER - -_SFDL_FLAGS=-E -C -x c++ -when ($CLANG == "yes") { - _SFDL_FLAGS+=-Qunused-arguments -} - -_DEBUG_INFO_FLAGS=-g -when ($OS_LINUX == "yes") { - _DEBUG_INFO_FLAGS=-g -ggnu-pubnames -} - -_CROSS_SUFFIX=.pic -when ($FORCE_NO_PIC == "yes") { - _CROSS_SUFFIX= -} - -C_COMPILER=${quo:C_COMPILER_UNQUOTED} -OPTIMIZE=$_OPTIMIZE_RELEASE -FSTACK=-fstack-protector -DUMP_DEPS= -GCC_PREPROCESSOR_OPTS=$DUMP_DEPS $C_DEFINES -C_WARNING_OPTS=$_C_WARNINGS -CXX_WARNING_OPTS=$_CXX_WARNINGS - -# PIE is only valid for executables, while PIC implies a shared library -# `-pie` with a shared library is either ignored or fails to link -when ($PIC == "yes") { - CFLAGS+=-fPIC - LDFLAGS+=-fPIC -} -elsewhen ($PIE == "yes") { - CFLAGS+=-fPIE - LDFLAGS+=-fPIE -pie -} - -CFLAGS+=$_C_FLAGS $DEBUG_INFO_FLAGS $_C_FOPTIONS $C_WARNING_OPTS $GCC_PREPROCESSOR_OPTS $USER_CFLAGS $USER_CFLAGS_GLOBAL -CXXFLAGS+=$CFLAGS $_CXX_STD $CXX_WARNING_OPTS $USER_CXXFLAGS $USER_CXXFLAGS_GLOBAL -CONLYFLAGS+=$USER_CONLYFLAGS $USER_CONLYFLAGS_GLOBAL -CXX_COMPILER=${quo:CXX_COMPILER_UNQUOTED} -NOGCCSTACKCHECK=yes -SFDL_FLAG=$_SFDL_FLAGS -o $SFDL_TMP_OUT -WERROR_FLAG=-Werror -DEBUG_INFO_FLAGS=$_DEBUG_INFO_FLAGS - -when ($NO_WSHADOW == "yes") { - C_WARNING_OPTS += -Wno-shadow -} -# Though -w is intended to switch off all the warnings, -# it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang. -# -# Use -Wno-everything to force warning suppression. -when ($NO_COMPILER_WARNINGS == "yes") { - C_WARNING_OPTS = -w - CXX_WARNING_OPTS = -Wno-everything -} -when ($NO_OPTIMIZE == "yes") { - OPTIMIZE = -O0 -} -when ($SAVE_TEMPS == "yes") { - CXXFLAGS += -save-temps -} -when ($NOGCCSTACKCHECK != "yes") { - FSTACK += -fstack-check -} - -when ($FORCE_CONSISTENT_DEBUG == "yes") { - when ($CLANG == "yes") { - CL_DEBUG_INFO=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T -Xclang -fdebug-compilation-dir -Xclang /tmp - } - otherwise { - CL_DEBUG_INFO=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T - } - YASM_DEBUG_INFO=--replace=${ARCADIA_BUILD_ROOT}=/-B --replace=${ARCADIA_ROOT}=/-S --replace=$(TOOL_ROOT)=/-T -} -elsewhen ($CONSISTENT_DEBUG == "yes") { - when ($CLANG == "yes") { - CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T -Xclang -fdebug-compilation-dir -Xclang /tmp - } - otherwise { - CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -fdebug-prefix-map=${ARCADIA_ROOT}=/-S -fdebug-prefix-map=$(TOOL_ROOT)=/-T - } - YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=--replace=${ARCADIA_BUILD_ROOT}=/-B --replace=${ARCADIA_ROOT}=/-S --replace=$(TOOL_ROOT)=/-T -} -elsewhen ($CONSISTENT_DEBUG_LIGHT == "yes") { - when ($CLANG == "yes") { - CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B -Xclang -fdebug-compilation-dir -Xclang /tmp - } - otherwise { - CL_DEBUG_INFO_DISABLE_CACHE__NO_UID__=-fdebug-prefix-map=${ARCADIA_BUILD_ROOT}=/-B - } - YASM_DEBUG_INFO_DISABLE_CACHE__NO_UID__=--replace=${ARCADIA_BUILD_ROOT}=/-B -} - -when ($FORCE_CONSISTENT_BUILD == "yes") { - CL_MACRO_INFO=-Wno-builtin-macro-redefined -D__DATE__=\""Sep 31 2019\"" -D__TIME__=\"00:00:00\" -fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/= -fmacro-prefix-map=${ARCADIA_ROOT}/= -fmacro-prefix-map=$(TOOL_ROOT)/= -} -elsewhen ($CONSISTENT_BUILD == "yes") { - CL_MACRO_INFO_DISABLE_CACHE__NO_UID__=-Wno-builtin-macro-redefined -D__DATE__=\""Sep 31 2019\"" -D__TIME__=\"00:00:00\" -fmacro-prefix-map=${ARCADIA_BUILD_ROOT}/= -fmacro-prefix-map=${ARCADIA_ROOT}/= -fmacro-prefix-map=$(TOOL_ROOT)/= -} - -_CFLAGS_ARCH_I386= -when ($ARCH_I386 == "yes" && $ARCH_I686 != "yes") { - _CFLAGS_ARCH_I386=-march=pentiumpro -mtune=pentiumpro -} - -CFLAGS+=$_CFLAGS_ARCH_I386 - -BC_CFLAGS+=$CFLAGS -BC_CXXFLAGS+=$CXXFLAGS -C_DEFINES+=-D__LONG_LONG_SUPPORTED - -OBJ_CROSS_SUF=$OBJ_SUF$_CROSS_SUFFIX -OBJECT_SUF=$OBJ_SUF$_CROSS_SUFFIX.o -GCC_COMPILE_FLAGS=$EXTRA_C_FLAGS -c -o $_COMPILE_OUTPUTS ${pre=-I:_C__INCLUDE} -EXTRA_COVERAGE_OUTPUT=${output;noauto;hide;suf=${OBJECT_SUF}.gcno:SRC} -CLANG_TIDY_OUTPUT_FILE=${output;noauto;suf=${OBJECT_SUF}.tidyjson:SRC} -YNDEXER_OUTPUT_FILE=${output;noauto;suf=${OBJECT_SUF}${COMPILE_OUT_SUFFIX}.ydx.pb2:SRC} - -when ($DUMP_COMPILER_DEPS == "yes") { - DUMP_DEPS=-MD ${output;hide;noauto;suf=${OBJ_SUF}.o.d:SRC} -} -elsewhen ($DUMP_COMPILER_DEPS_FAST == "yes") { - DUMP_DEPS=-E -M -MF ${output;noauto;suf=${OBJ_SUF}.o.d:SRC} -} - -_COMPILER_TIME_TRACE_GRANULARITY=500 -when ($TIME_TRACE_GRANULARITY && $TIME_TRACE_GRANULARITY != "") { - _COMPILER_TIME_TRACE_GRANULARITY=$TIME_TRACE_GRANULARITY -} - -_COMPILER_TIME_TRACE_FLAGS= -_COMPILER_TIME_TRACE_POSTPROCESS= -when (($TIME_TRACE == "yes" || $COMPILER_TIME_TRACE == "yes") && $CLANG == "yes" && $_TC_VERSION_AT_LEAST_9 == "yes") { - _COMPILER_TIME_TRACE_FLAGS=-ftime-trace -ftime-trace-granularity=$_COMPILER_TIME_TRACE_GRANULARITY - _COMPILER_TIME_TRACE_POSTPROCESS=$YMAKE_PYTHON ${input:"build/scripts/find_time_trace.py"} $_COMPILE_OUTPUTS $_COMPILE_TIME_TRACE_OUTPUTS -} - -_C_CPP_KV_STYLE=${hide;kv:"p CC"} ${hide;kv:"pc green"} -_CPP_ARGS=\ - $CLANG_TIDY_ARGS \ - $YNDEXER_ARGS \ - $CXX_COMPILER \ - $C_FLAGS_PLATFORM \ - $GCC_COMPILE_FLAGS \ - $CXXFLAGS \ - $CL_MACRO_INFO \ - $CL_MACRO_INFO_DISABLE_CACHE__NO_UID__ \ - $_COMPILER_TIME_TRACE_FLAGS \ - $EXTRA_OUTPUT \ - $SRCFLAGS \ - $_LANG_CFLAGS_VALUE \ - ${input:SRC} \ - $TOOLCHAIN_ENV \ - $YNDEXER_OUTPUT \ - && $_COMPILER_TIME_TRACE_POSTPROCESS \ - $_C_CPP_KV_STYLE - -_C_ARGS=\ - $CLANG_TIDY_ARGS \ - $YNDEXER_ARGS \ - $C_COMPILER \ - $C_FLAGS_PLATFORM \ - $GCC_COMPILE_FLAGS \ - $CFLAGS \ - $CL_MACRO_INFO \ - $CL_MACRO_INFO_DISABLE_CACHE__NO_UID__ \ - $_COMPILER_TIME_TRACE_FLAGS \ - $CONLYFLAGS \ - $EXTRA_OUTPUT \ - $SRCFLAGS \ - ${input:SRC} \ - $TOOLCHAIN_ENV \ - $YNDEXER_OUTPUT \ - $_C_CPP_KV_STYLE - -### _SRC_C_NODEPS_CMD is obtained from _C_ARGS by filtering the following elements: -### ${input:SRC} -### $CL_MACRO_INFO -### $CL_MACRO_INFO_DISABLE_CACHE__NO_UID__ -### $CLANG_TIDY_ARGS -### $EXTRA_OUTPUT -### $EXTRA_COVERAGE_OUTPUT -### $SRCFLAGS -### $YNDEXER_ARGS -### $YNDEXER_OUTPUT -### -### $GCC_COMPILE_FLAGS is substituted for $EXTRA_C_FLAGS -c -o ${OUTFILE} ${SRC} ${pre=-I:INC} -_SRC_C_NODEPS_CMD=\ - $C_COMPILER \ - $C_FLAGS_PLATFORM \ - $EXTRA_C_FLAGS -c -o ${OUTFILE} ${SRC} ${pre=-I:INC} \ - $CFLAGS \ - $CONLYFLAGS \ - $TOOLCHAIN_ENV \ - $_C_CPP_KV_STYLE - -_SRC_CPP_CMD=$_CPP_ARGS -_SRC_C_CMD=$_C_ARGS -_SRC_M_CMD=$SRC_c($SRC $SRCFLAGS) -_SRC_MASM_CMD=$_EMPTY_CMD - -# fuzzing configuration -when ($CLANG == "yes") { - when ($_TC_VERSION_AT_LEAST_12 == "yes") { - LIBFUZZER_PATH=contrib/libs/libfuzzer12 - } -} diff --git a/build/conf/compilers/msvc_compiler.conf b/build/conf/compilers/msvc_compiler.conf deleted file mode 100644 index 27b53a64cd..0000000000 --- a/build/conf/compilers/msvc_compiler.conf +++ /dev/null @@ -1,270 +0,0 @@ -_MSVC_MACRO=_WIN32_WINNT -_MSVC_WINDOWS7=0x0601 -_MSVC_WINDOWS8=0x0602 - -_MSVC_WARNS_ENABLED= -# 'expression' : signed/unsigned mismatch -_MSVC_WARNS_ENABLED+=/w14018 -# 'class' : class has virtual functions, but destructor is not virtual -_MSVC_WARNS_ENABLED+=/w14265 -# 'operator' : expression is always false -_MSVC_WARNS_ENABLED+=/w14296 -# missing type specifier - int assumed -_MSVC_WARNS_ENABLED+=/w14431 - -_MSVC_WARNS_AS_ERRORS= -# 'function' undefined; assuming extern returning int -_MSVC_WARNS_AS_ERRORS+=/we4013 - -_MSVC_WARNS_DISABLED= -# conditional expression is constant -_MSVC_WARNS_DISABLED+=/wd4127 -# nonstandard extension used : zero-sized array in struct/union -_MSVC_WARNS_DISABLED+=/wd4200 -# nonstandard extension used : nameless struct/union -_MSVC_WARNS_DISABLED+=/wd4201 -# elements of array will be default initialized -_MSVC_WARNS_DISABLED+=/wd4351 -# 'this' : used in base member initializer list -_MSVC_WARNS_DISABLED+=/wd4355 -# decorated name length exceeded, name was truncated -_MSVC_WARNS_DISABLED+=/wd4503 -# default constructor could not be generated -_MSVC_WARNS_DISABLED+=/wd4510 -# copy constructor could not be generated -_MSVC_WARNS_DISABLED+=/wd4511 -# assignment operator could not be generated -_MSVC_WARNS_DISABLED+=/wd4512 -# check operator precedence for possible error; use parentheses to clarify precedence -_MSVC_WARNS_DISABLED+=/wd4554 -# 'object' can never be instantiated - user defined constructor required -_MSVC_WARNS_DISABLED+=/wd4610 -# assignment within conditional expression -_MSVC_WARNS_DISABLED+=/wd4706 -# forcing value to bool 'true' or 'false' (performance warning) -_MSVC_WARNS_DISABLED+=/wd4800 -# The POSIX name for this item is deprecated -_MSVC_WARNS_DISABLED+=/wd4996 -# function marked as __forceinline not inlined -_MSVC_WARNS_DISABLED+=/wd4714 -# 'TAtomic' : top-level volatile in cast is ignored -_MSVC_WARNS_DISABLED+=/wd4197 -# 'initializing' : conversion from 'int' to 'ui32', signed/unsigned mismatch -_MSVC_WARNS_DISABLED+=/wd4245 -# 'ystd::function<void (uint8_t *)>': structure was padded due to alignment specifier -_MSVC_WARNS_DISABLED+=/wd4324 -# 'register' is no longer a supported storage class -_MSVC_WARNS_DISABLED+=/wd5033 - -_C_WARNINGS_CLANG_CL= -_CXX_WARNINGS_CLANG_CL= -_CXX_WARNINGS_CLANG_CL_IDE_MSVS= -when ($CLANG_CL == "yes") { - _C_WARNINGS_CLANG_CL=\ - -Wno-format \ - -Wno-parentheses \ - -Wno-unknown-warning-option - - _CXX_WARNINGS_CLANG_CL=\ - -Wimport-preprocessor-directive-pedantic \ - -Woverloaded-virtual \ - -Wno-ambiguous-reversed-operator \ - -Wno-defaulted-function-deleted \ - -Wno-deprecated-anon-enum-enum-conversion \ - -Wno-deprecated-enum-enum-conversion \ - -Wno-deprecated-enum-float-conversion \ - -Wno-deprecated-volatile \ - -Wno-undefined-var-template - - when ($IDE_MSVS == "yes") { - _CXX_WARNINGS_CLANG_CL_IDE_MSVS=-Wno-unused-command-line-argument - } -} - -_C_WARNINGS =$_MSVC_WARNS_AS_ERRORS -_C_WARNINGS+=$_MSVC_WARNS_ENABLED -_C_WARNINGS+=$_MSVC_WARNS_DISABLED -_C_WARNINGS+=$_C_WARNINGS_CLANG_CL - -_CXX_WARNINGS = -_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG_CL -_CXX_WARNINGS+=$_CXX_WARNINGS_CLANG_CL_IDE_MSVS - -_WINAPI_UNICODE=no - -_DEFINES_ARCH= -when ($ARCH_X86_64 == "yes") { - _DEFINES_ARCH=/D_WIN64 /DWIN64 -} -elsewhen ($ARCH_ARMV7 == "yes") { - _DEFINES_ARCH=/D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE /D__arm__ -} - -_DEFINES_WIN32_WINNT=/D$_MSVC_MACRO=$_MSVC_WINDOWS7 - -when ($_WINAPI_UNICODE == "yes") { - _DEFINES_UNICODE=/DUNICODE /D_UNICODE -} -otherwise { - _DEFINES_UNICODE=/D_MBCS -} - -_C_DEFINES=\ - /DARCADIA_ROOT=${ARCADIA_ROOT} \ - /DARCADIA_BUILD_ROOT=${ARCADIA_BUILD_ROOT} \ - /DFAKEID=$CPP_FAKEID \ - /DWIN32 \ - /D_WIN32 \ - /D_WINDOWS \ - /D_CRT_SECURE_NO_WARNINGS \ - /D_CRT_NONSTDC_NO_WARNINGS \ - /D_USE_MATH_DEFINES \ - /D__STDC_CONSTANT_MACROS \ - /D__STDC_FORMAT_MACROS \ - /D_USING_V110_SDK71_ \ - /D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES \ - /DWIN32_LEAN_AND_MEAN \ - /DNOMINMAX - -_C_DEFINES+=$_DEFINES_ARCH -_C_DEFINES+=$_DEFINES_WIN32_WINNT -_C_DEFINES+=$_DEFINES_UNICODE - -C_DEFINES+=$_C_DEFINES - -_MSVC_FLAGS_CLANG= -_MSVC_FLAGS_CLANG_ARCH= -_MSVC_FLAGS_CLANG_EQ_2019= -when ($CLANG_CL == "yes") { - # -fcase-insensitive-paths - # Allow <windows.h> to be included via <Windows.h> in case-sensitive file-systems. - # - # -fms-compatibility-version - # At the time clang-cl identifies itself as MSVC 19.11: - # (actual value can be found in clang/lib/Driver/ToolChains/MSVC.cpp, the syntax would be like - # ``` - # MSVT = VersionTuple(19, 11); - # ``` - # - # We override this value to match current value of the actual MSVC being used. - # - _MSVC_FLAGS_CLANG=-fcase-insensitive-paths -fms-compatibility-version=19.21 - when ($ARCH_X86_64 == "yes") { - _MSVC_FLAGS_CLANG_ARCH=-m64 - } - elsewhen ($ARCH_I386 == "yes") { - _MSVC_FLAGS_CLANG_ARCH=-m32 - } - otherwise { - _MSVC_FLAGS_CLANG_ARCH= - } - -} - -_MSVC_FLAGS=/nologo /Zm500 /GR /bigobj /FC /EHs /errorReport:prompt $MSVC_INLINE_FLAG /utf-8 -# enable standard conforming mode -_MSVC_FLAGS+=/permissive- -_MSVC_FLAGS+=$_MSVC_FLAGS_ARCH_OPT -_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG -_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG_ARCH -_MSVC_FLAGS+=$_MSVC_FLAGS_CLANG_EQ_2019 -_MSVC_FLAGS+=$_MSVC_FLAGS_INCLUDE - -MSVC_INLINE_OPTIMIZED=yes -when ($MSVC_INLINE_OPTIMIZED == "yes") { - MSVC_INLINE_FLAG=/Zc:inline -} -when ($MSVC_INLINE_OPTIMIZED == "no") { - MSVC_INLINE_FLAG=/Zc:inline- -} - -# Use builtin offsetof implementation -# instead of a crutcy macro defined in ucrt/stddef.h. -# The latter can not be used in constexpr statements. -_CXX_DEFINES=/D_CRT_USE_BUILTIN_OFFSETOF - -_FLAGS_C_ONLY= - -# Provide proper __cplusplus value -# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ -_CXX_FLAGS=/Zc:__cplusplus - -_FLAGS_MSVS_ONLY= -DEBUG_INFO_FLAGS=/Z7 -when ($IDE_MSVS == "yes") { - when ($CLANG_CL != "yes") { - _FLAGS_MSVS_ONLY=/FD /MP - } - DEBUG_INFO_FLAGS=/Zi /FS -} - -C_WARNING_OPTS=$_C_WARNINGS -CXX_WARNING_OPTS=$_CXX_WARNINGS - -# https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx -when ($DLL_RUNTIME == "yes") { - _FLAGS_DEBUG_RUNTIME=/MDd - _FLAGS_RELEASE_RUNTIME=/MD -} -otherwise { - _FLAGS_DEBUG_RUNTIME=/MTd - _FLAGS_RELEASE_RUNTIME=/MT -} -CFLAGS_DEBUG=/Ob0 /Od /D_DEBUG $_FLAGS_DEBUG_RUNTIME -CFLAGS_RELEASE=/Ox /Ob2 /Oi /DNDEBUG $_FLAGS_RELEASE_RUNTIME - -MASMFLAGS= -_MASM_IO=/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC} -when ($ARCH_ARMV7) { - _MASM_IO=-o ${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC} -} - -OBJ_CROSS_SUF=$OBJ_SUF -OBJECT_SUF=$OBJ_SUF.obj - -CFLAGS+=$_MSVC_FLAGS $_FLAGS_MSVS_ONLY $CFLAGS_PER_TYPE $DEBUG_INFO_FLAGS $C_WARNING_OPTS $C_DEFINES $USER_CFLAGS $USER_CFLAGS_GLOBAL -CXXFLAGS+=$CFLAGS $_STD_CXX $_CXX_FLAGS $_CXX_DEFINES $CXX_WARNING_OPTS $USER_CXXFLAGS $USER_CXXFLAGS_GLOBAL -CONLYFLAGS+=$_FLAGS_C_ONLY $USER_CONLYFLAGS $USER_CONLYFLAGS_GLOBAL - -BC_CFLAGS+=$CFLAGS -BC_CXXFLAGS+=$BC_CFLAGS $CXXFLAGS - -CFLAGS+=$_CFLAGS_UCRT_VC_INCLUDES - -when ($NO_WSHADOW == "yes") { - C_WARNING_OPTS+=/wd4456 /wd4457 -} - -when ($NO_COMPILER_WARNINGS == "yes") { - C_WARNING_OPTS=/w - when ($CLANG_CL == "yes") { - # Though /w is intended to switch off all the warnings, - # it does not switch at least -Wregister and -Wreserved-user-defined-literal under clang-cl. - # - # Use -Wno-everything to force warning suppression. - CXX_WARNING_OPTS=-Wno-everything - } - otherwise { - CXX_WARNING_OPTS= - } -} - -when ($NO_OPTIMIZE == "yes") { - OPTIMIZE=/Od -} - -SFDL_FLAG=/E /C /P /TP /Fi$SFDL_TMP_OUT -WERROR_FLAG=/WX - -CL_WRAPPER=${FIX_MSVC_OUTPUT} cl -ML_WRAPPER=${FIX_MSVC_OUTPUT} ml -when ($_UNDER_WINE == "yes") { - CL_WRAPPER= - ML_WRAPPER= -} - -_SRC_C_NODEPS_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo${OUTFILE} ${SRC} ${EXTRA_C_FLAGS} ${pre=/I :INC} ${CFLAGS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"} -_SRC_CPP_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${CXX_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CXXFLAGS} ${SRCFLAGS} ${_LANG_CFLAGS_VALUE} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"} -_SRC_C_CMD=${TOOLCHAIN_ENV} ${CL_WRAPPER} ${C_COMPILER} /c /Fo$_COMPILE_OUTPUTS ${input;msvs_source:SRC} ${EXTRA_C_FLAGS} ${pre=/I :_C__INCLUDE} ${CFLAGS} ${CONLYFLAGS} ${SRCFLAGS} ${hide;kv:"soe"} ${hide;kv:"p CC"} ${hide;kv:"pc yellow"} -_SRC_M_CMD=$_EMPTY_CMD -_SRC_MASM_CMD=${cwd:ARCADIA_BUILD_ROOT} ${TOOLCHAIN_ENV} ${ML_WRAPPER} ${MASM_COMPILER} ${MASMFLAGS} ${SRCFLAGS} $_MASM_IO ${kv;hide:"p AS"} ${kv;hide:"pc yellow"} diff --git a/build/conf/docs.conf b/build/conf/docs.conf deleted file mode 100644 index 942f6d4d04..0000000000 --- a/build/conf/docs.conf +++ /dev/null @@ -1,409 +0,0 @@ -# -# Documentation build support -# - -# tag:docs -TOUCH_DOCS=$YMAKE_PYTHON ${input:"build/scripts/touch.py"} ${kv;hide:"p DC"} ${kv;hide:"pc light-cyan"} $TARGET -TOUCH_DOCS_MF=$TOUCH_DOCS && $GENERATE_MF - -# tag:docs -### @usage: DOCS_COPY_FILE(FROM src_dir [NAMESPCE dst_dir] files...) -### -### Copy files from src_dir to $BINDIR/dst_dir -macro DOCS_COPY_FILES(FROM="${CURDIR}", NAMESPACE=".", FILES...) { - .CMD=$YMAKE_PYTHON ${input:"build/scripts/copy_docs_files.py"} ${input;hide:"build/scripts/process_command_files.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --src-dir $FROM --dst-dir $BINDIR/$NAMESPACE $FILES ${input;hide;context=TEXT;pre=${FROM}/:FILES} ${output;hide;pre=${NAMESPACE}/:FILES} -} - -# tag:docs -_DOCS_USE_PLANTUML=no -_DOCS_EXTRA_TOOLS= -_DOCS_EXTRA_INPUTS= -_DOCS_ENV= -_DOCS_KV=${kv;hide:"p DO"} ${kv;hide:"pc light-cyan"} ${kv;hide:"show_out yes"} - -_DOCS_PLANTUML_ENV=\ -${env:"JAVA_PATH=$JDK_RESOURCE_GLOBAL/bin/java"} \ -${env:"PLANTUML_PATH=${ARCADIA_BUILD_ROOT}/contrib/tools/plantuml/plantuml.run.cp.jar"} \ -${env:"_JAVA_OPTIONS='-Dsun.awt.fontconfig=$BINDIR/fontconfig.properties -Djava.awt.headless=true'"} \ -${env:"LANG=en_US.UTF-8"} \ -${env:"LC_ALL=C.UTF-8"} - -_DOCS_SRCS_VALUE= -_DOCS_VARS_FLAG= - -_DOCS_YFM_OUTPUT_FORMAT= -_DOCS_YFM_BOOK_OUTPUT_FORMAT=--output-format html --allowHTML -_DOCS_YFM_LIB_OUTPUT_FORMAT=--output-format md --add-map-file - -_DOCS_YFM_CMDLINE=\ -${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/extract_docs.py"} ${input;hide:"build/scripts/process_command_files.py"} --skip-prefix $ARCADIA_BUILD_ROOT --dest-dir $BINDIR/__s ${rootrel:PEERS} \ -&& $YMAKE_PYTHON ${input:"build/scripts/stdout2stderr.py"} $YFM_TOOL_RESOURCE_GLOBAL/yfm-docs --input $BINDIR/__s --output $BINDIR/__docsbuild $_DOCS_VARS_FLAG $_DOCS_YFM_OUTPUT_FORMAT --config ${input:CONFIG} $_DOCS_EXTRA_TOOLS ${hide;input:EXTRA_INPUTS} $_DOCS_ENV \ -&& $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --output $TARGET --input $BINDIR/__docsbuild $_DOCS_KV - -# tag:internal tag:docs -macro _DOCS_YFM_CMD_IMPL(CONFIG, INCLUDE_SRCS[], EXTRA_INPUTS[]) { - .CMD=$_DOCS_YFM_CMDLINE -} - -_DOCS_YFM_CMD=$_DOCS_YFM_CMD_IMPL($_DOCS_CONFIG_VALUE INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE EXTRA_INPUTS $_DOCS_EXTRA_INPUTS) - -# tag:docs -### This module is intended for internal use only. Common parts for DOCS and MKDOCS multimodules -### should be defined here. -module _DOCS_BARE_UNIT: _BARE_UNIT { - .ALLOWED=DOCS_DIR DOCS_CONFIG DOCS_VARS - .CMD=TOUCH_DOCS_MF - .FINAL_TARGET=no - .PEERDIR_POLICY=as_include - - ENABLE(_DOCS_BARE_UNIT) - - SET(MODULE_SUFFIX .tar.gz) - SET(MODULE_LANG DOCS) -} - -# tag:docs tag:internal -_DOCS_DIR_INTERNAL_NAMESPACE= - -# tag:internal tag:docs -_DOCS_LIBRARY_CMDLINE=\ -$YMAKE_PYTHON ${input:"build/scripts/copy_docs_files_to_dir.py"} ${input;hide:"build/scripts/process_command_files.py"} $_DOCS_SRCS_VALUE $_DOCS_DIR_VALUE $_DOCS_BIN_DIR_VALUE --dest-dir $BINDIR/__s --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT ${input;context=TEXT:INCLUDE_SRCS} \ -&& $YMAKE_PYTHON ${input:"build/scripts/tar_sources.py"} --output $TARGET --input $BINDIR/__s $_DOCS_KV - -# tag:internal tag:docs -macro _DOCS_LIBRARY_CMD_IMPL(INCLUDE_SRCS[], EXTRA_INPUTS[]) { - .CMD=$_DOCS_LIBRARY_CMDLINE -} - -_DOCS_LIBRARY_CMD=$_DOCS_LIBRARY_CMD_IMPL(INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE) - -# tag:docs -module DOCS_LIBRARY: _DOCS_BARE_UNIT { - .CMD=_DOCS_LIBRARY_CMD - .ALIASES=SRCS=_DOCS_SRCS DOCS_DIR=_YFM_DOCS_DIR - .EPILOGUE=_DOCS_LIBRARY_EPILOGUE - - ENABLE(DOCS_LIBRARY) - - SET(MODULE_TYPE LIBRARY) - SET(MODULE_TAG DOCS_LIBRARY) - SET(PEERDIR_TAGS DOCS_LIBRARY) - - SET(MODULE_SUFFIX .docslib) -} - -# tag:docs -macro _DOCS_SRCS(SRCDIR=".", EXCLUDE[], INCLUDE...) { - SET(_VAR_DOCS_SRCS_SALT $SRCDIR $EXCLUDE $INCLUDE) - SET(_DOCS_SRCS_GLOB uniq_docs_${hash:_VAR_DOCS_SRCS_SALT}) - _LATE_GLOB(${_DOCS_SRCS_GLOB} ${pre=${SRCDIR}/:INCLUDE} EXCLUDE ${EXCLUDE}) - SET_APPEND(_DOCS_INCLUDE_SOURCES_VALUE \${input:$_DOCS_SRCS_GLOB}) -} - -# tag:docs -macro _DOCS_LIBRARY_EPILOGUE() { - _YFM_DOCS_DIR($_YFM_DOCS_DIR_DEFAULT_VALUE) - _SET_DOCS_BIN_DIR_FLAG($_DOCS_DIR_INTERNAL_NAMESPACE $MODDIR) -} - -# tag:docs -### This module is intended for internal use only. Common parts for submodules of DOCS multimodule -### should be defined here. -module _DOCS_BASE_UNIT: _DOCS_BARE_UNIT { - .ALIASES=DOCS_DIR=_YFM_DOCS_DIR - ENABLE(_DOCS_BASE_UNIT) - - PEERDIR+=build/platform/yfm - DOCS_CONFIG($_DOCS_YFM_DEFAULT_CONFIG) -} - -# tag:internal tag:docs -### _DOCS_YFM_USE_PLANTUML() # internal -### -### This macr sets appropriate dependencies for use of plantuml plugin -macro _DOCS_YFM_USE_PLANTUML() { - PEERDIR(build/platform/java/jdk contrib/java/openjdk-fontconfig) - COPY_FILE(${ARCADIA_BUILD_ROOT}/contrib/java/openjdk-fontconfig/fontconfig.properties fontconfig.properties) - SET_APPEND(_DOCS_EXTRA_TOOLS \${hide;tool:"contrib/tools/plantuml"}) - SET_APPEND(_DOCS_EXTRA_INPUTS fontconfig.properties) - # It's rather strange that a commented statement below doesn't work - # SET_APPEND(_DOCS_ENV ${_DOCS_PLANTUML_ENV}) - when ($_DOCS_USE_PLANTUML) { - _DOCS_ENV+=$_DOCS_PLANTUML_ENV - } -} - -# tag:docs -### @usage: DOCS() -### -### Documentation project multimodule. -### -### When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site. -### When PEERDIRed from other DOCS() module behaves like a UNION (supplying own content and dependencies to build target). -### Peerdirs from modules other than DOCS are not accepted. -### Most usual macros are not accepted, only used with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS(). -### -### @see: [DOCS_DIR()](#macro_DOCS_DIR), [DOCS_CONFIG()](#macro_DOCS_CONFIG), [DOCS_VARS()](#macro_DOCS_VARS). -multimodule DOCS { - module DOCSBOOK: _DOCS_BASE_UNIT { - .CMD=_DOCS_YFM_CMD - .FINAL_TARGET=yes - .PEERDIR_POLICY=as_build_from - .IGNORED=DOCS_DIR DOCS_INCLUDE_SOURCES DOCS_COPY_FILES PEERDIR PYTHON RUN_PROGRAM RUN_PYTHON3 RUN_LUA RUN_JAVA_PROGRAM FROM_SANDBOX - .PEERDIRSELF=DOCSLIB_INTERNAL - - ENABLE(DOCSBOOK) - - SET(MODULE_TYPE PROGRAM) - SET(MODULE_TAG DOCSBOOK) - SET(PEERDIR_TAGS DOCSLIB_INTERNAL) - - _DOCS_YFM_OUTPUT_FORMAT=$_DOCS_YFM_BOOK_OUTPUT_FORMAT - - PROCESS_DOCS() - } - - module DOCSLIB: _DOCS_BASE_UNIT { - .CMD=_DOCS_YFM_CMD - .FINAL_TARGET=yes - .PEERDIR_POLICY=as_build_from - .IGNORED=DOCS_DIR DOCS_INCLUDE_SOURCES DOCS_COPY_FILES PEERDIR PYTHON RUN_PROGRAM RUN_PYTHON3 RUN_LUA RUN_JAVA_PROGRAM FROM_SANDBOX - .PEERDIRSELF=DOCSLIB_INTERNAL - - ENABLE(DOCSLIB) - - SET(MODULE_TYPE PROGRAM) - SET(MODULE_TAG DOCSLIB) - SET(PEERDIR_TAGS DOCSLIB_INTERNAL) - - REALPRJNAME=preprocessed - - _DOCS_YFM_OUTPUT_FORMAT=$_DOCS_YFM_LIB_OUTPUT_FORMAT - - PROCESS_DOCS() - } - - module DOCSLIB_INTERNAL: DOCS_LIBRARY { - .IGNORED=DOCS_CONFIG - .EPILOGUE=_DOCS_LIBRARY_EPILOGUE - - ENABLE(DOCSLIB_INTERNAL) - DISABLE(START_TARGET) - - SET(MODULE_TYPE LIBRARY) - SET(MODULE_TAG DOCSLIB_INTERNAL) - SET(PEERDIR_TAGS DOCSLIB_EXTERNAL DOCS_LIBRARY) - # additional .fake extension make this output suppressed by ya-bin - SET(MODULE_SUFFIX .docslib.fake) - - SET(_DOCS_DIR_INTERNAL_NAMESPACE .) - - REALPRJNAME=__docs_internal - } - - module DOCSLIB_EXTERNAL: DOCS_LIBRARY { - .IGNORED=DOCS_CONFIG - .EPILOGUE=_DOCS_LIBRARY_EPILOGUE - - ENABLE(DOCSLIB_EXTERNAL) - DISABLE(START_TARGET) - - SET(MODULE_TYPE LIBRARY) - SET(MODULE_TAG DOCSLIB_EXTERNAL) - SET(PEERDIR_TAGS DOCSLIB_EXTERNAL DOCS_LIBRARY) - - REALPRJNAME=__docs_external - } -} - -_DOCS_MKDOCS_CMDLINE_SUFFIX= -_DOCS_MKDOCS_BOOK_CMDLINE_SUFFIX=${pre=--dep ;ext=preprocessed.tar.gz:PEERS} -_DOCS_MKDOCS_LIB_CMDLINE_SUFFIX=--preprocess-md-only - -_DOCS_MKDOCS_CMDLINE=\ -${cwd:ARCADIA_ROOT} $FS_TOOLS copy_all_files $_MKDOCS_DOCS_DIR_VALUE $BINDIR/__s $_DOCS_SRCS_VALUE \ -&& $YMAKE_PYTHON ${input:"build/scripts/copy_files_to_dir.py"} ${input;hide:"build/scripts/process_command_files.py"} --dest-dir $BINDIR/__s --skip-prefix $ARCADIA_ROOT --skip-prefix $ARCADIA_BUILD_ROOT ${input;context=TEXT:INCLUDE_SRCS} \ -&& ${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/mkdocs_builder_wrapper.py"} $ARCADIA_BUILD_ROOT ${tool:"tools/mkdocs_builder"} --docs-dir $BINDIR/__s --output-tar $TARGET --config ${input:CONFIG} $_DOCS_VARS_FLAG $_DOCS_MKDOCS_CMDLINE_SUFFIX $_DOCS_EXTRA_TOOLS ${hide;input:EXTRA_INPUTS} $_DOCS_ENV $_DOCS_KV - -# tag:internal tag:docs -macro _DOCS_MKDOCS_CMD_IMPL(CONFIG, INCLUDE_SRCS[], EXTRA_INPUTS[]) { - .CMD=$_DOCS_MKDOCS_CMDLINE -} - -_DOCS_MKDOCS_CMD=$_DOCS_MKDOCS_CMD_IMPL($_DOCS_CONFIG_VALUE INCLUDE_SRCS $_DOCS_INCLUDE_SOURCES_VALUE) - -_DOCS_YFM_DEFAULT_CONFIG=$MODDIR/.yfm -_DOCS_MKDOCS_DEFAULT_CONFIG=$MODDIR/mkdocs.yml - -# tag:docs -### This module is intended for internal use only. Common parts for submodules of MKDOCS multimodule -### should be defined here. -module _MKDOCS_BASE_UNIT: _DOCS_BARE_UNIT { - .RESTRICTED=DOCS_BUILDER - .ALIASES=DOCS_DIR=_MKDOCS_DOCS_DIR - - ENABLE(_MKDOCS_BASE_UNIT) - - DOCS_CONFIG($_DOCS_MKDOCS_DEFAULT_CONFIG) -} - -# tag:internal tag:docs -### _MKDOCS_EPILOOGUE() # internal -### -### This macro executes macros which should be envoked after all user -### specified macros in the ya.make file -macro _MKDOCS_EPILOGUE() { - _LATE_GLOB(_DOCS_SRCS_GLOB ${pre=${ARCADIA_ROOT}/;suf=/**/*:_MKDOCS_DOCS_DIR_VALUE}) - SET(_DOCS_SRCS_VALUE \${input;hide:_DOCS_SRCS_GLOB}) -} - -# tag:docs -### @usage: MKDOCS() -### -### Documentation project multimodule. -### -### When built directly, via RECURSE, DEPENDS or BUNDLE the output artifact is docs.tar.gz with statically generated site (using mkdocs as builder). -### When PEERDIRed from other MKDOCS() module behaves like a UNION (supplying own content and dependencies to build target). -### Peerdirs from modules other than MKDOCS are not accepted. -### Most usual macros are not accepted, only used with the macros DOCS_DIR(), DOCS_CONFIG(), DOCS_VARS(). -### -### @see: [DOCS_DIR()](#macro_DOCS_DIR), [DOCS_CONFIG()](#macro_DOCS_CONFIG), [DOCS_VARS()](#macro_DOCS_VARS). -multimodule MKDOCS { - module MKDOCSBOOK: _MKDOCS_BASE_UNIT { - .CMD=_DOCS_MKDOCS_CMD - .EPILOGUE=_MKDOCS_EPILOGUE - .FINAL_TARGET=yes - .PEERDIR_POLICY=as_build_from - - ENABLE(MKDOCSBOOK) - - SET(MODULE_TYPE PROGRAM) - SET(PEERDIR_TAGS MKDOCSLIB) - SET(MODULE_TAG MKDOCSBOOK) - - _DOCS_MKDOCS_CMDLINE_SUFFIX=$_DOCS_MKDOCS_BOOK_CMDLINE_SUFFIX - - PROCESS_MKDOCS() - } - - module MKDOCSLIB: _MKDOCS_BASE_UNIT { - .CMD=_DOCS_MKDOCS_CMD - .EPILOGUE=_MKDOCS_EPILOGUE - .PEERDIR_POLICY=as_include - - ENABLE(MKDOCSLIB) - - SET(MODULE_TYPE LIBRARY) - SET(PEERDIR_TAGS MKDOCSLIB) - SET(MODULE_TAG MKDOCSLIB) - - REALPRJNAME=preprocessed - - _DOCS_MKDOCS_CMDLINE_SUFFIX=$_DOCS_MKDOCS_LIB_CMDLINE_SUFFIX - - PROCESS_MKDOCS() - } -} - -# tag:docs -_DOCS_USE_PLANTUML= -### @usage: USE_PLANTUML() -### -### Use PlantUML plug-in for yfm builder to render UML diagrams into documentation -macro USE_PLANTUML() { - ENABLE(_DOCS_USE_PLANTUML) -} - -# tag:docs tag:deprecated -### @usage: DOCS_BUILDER(tool) # deprecated -macro DOCS_BUILDER(DocsTool) { - ENABLE(UNUSED_MACRO) -} - -# tag:docs -_DOCS_DIR_VALUE= -_DOCS_BIN_DIR_VALUE= -### @usage: DOCS_DIR(path) -### -### Specify directory with source .md files for DOCS multimodule if it differs from project directory. -### Path must be Arcadia root relative. -### -### @see: [DOCS](#multimodule_DOCS) -macro DOCS_DIR(Dir) { - ENABLE(UNUSED_MACRO) -} - -# tag:docs tag:internal -macro _APPEND_DOCS_DIR_FLAG(DIR, NAMESPACE, DYMMY...) { - SET_APPEND(_DOCS_DIR_VALUE --docs-dir $DIR $NAMESPACE) -} - -# tag:docs tag:internal -macro _SET_DOCS_BIN_DIR_FLAG(NAMESPACE, DUMMY...) { - SET(_DOCS_BIN_DIR_VALUE --bin-dir $BINDIR $NAMESPACE $AUTO_INPUT) -} - -# tag:docs tag:internal -_YFM_DOCS_DIR_DEFAULT_VALUE=$MODDIR -_YFM_DEFAULT_NAMESPACE= -### @usage: DOCS_DIR(path) # internal -macro _YFM_DOCS_DIR(DIR) { - _APPEND_DOCS_DIR_FLAG($DIR $_DOCS_DIR_INTERNAL_NAMESPACE $DIR) - - SET(_VAR_DOCS_DIR_SALT $MODDIR $DIR) - SET(_DOCS_DIR_GLOB uniq_docs_dir_${hash:_VAR_DOCS_DIR_SALT}) - _LATE_GLOB(${_DOCS_DIR_GLOB} ${ARCADIA_ROOT}/$DIR/**/*) - SET_APPEND(_DOCS_SRCS_VALUE \${input;hide:$_DOCS_DIR_GLOB}) - - # We set the value of var _YFM_DOCS_DIR_DEFAULT_VALUE to some non-existing dir. This value - # will be used in _DOCS_LIBRARY_EPILOGUE calls. In case when this macro _YFM_DOCS_DIR is - # explicitly called in DOCS_LIBRARY module $MODDIR as default DOCS_DIR for DOCS_LIBRARY will - # be ignore. - SET(_YFM_DOCS_DIR_DEFAULT_VALUE __dummy_dir__) -} - -# tag:docs tag:internal -_MKDOCS_DOCS_DIR_VALUE=$MODDIR -### @usage: DOCS_DIR(path) # internal -macro _MKDOCS_DOCS_DIR(Dir) { - SET(_MKDOCS_DOCS_DIR_VALUE $Dir) -} - -# tag:docs -_DOCS_DEFAULT_CONFIG= -_DOCS_CONFIG_VALUE=$_DOCS_DEFAULT_CONFIG -### @usage: DOCS_CONFIG(path) -### -### Specify path to config file for DOCS multimodule if it differs from default path. -### If used for [MKDOCS](#multimodule_MKDOCS) multimodule the default path is "%%project_directory%%/mkdocs.yml". -### If used for [DOCS](#multimodule_DOCS) multimodule the default path is "%%project_directory%%/.yfm". -### Path must be either Arcadia root relative. -### -### @see: [DOCS](#multimodule_DOCS) -macro DOCS_CONFIG(File) { - SET(_DOCS_CONFIG_VALUE $File) -} - -# tag:docs -_DOCS_VARS_VALUE= -### @usage: DOCS_VARS(variable1=value1 variable2=value2 ...) -### -### Specify a set of default values of template variables for DOCS multimodule. -### There must be no spaces around "=". Values will be treated as strings. -### -### @see: [DOCS](#multimodule_DOCS) -macro DOCS_VARS(Args...) { - SET_APPEND(_DOCS_VARS_VALUE $Args) -} - -# tag:docs -_DOCS_INCLUDE_SOURCES_VALUE= -### @usage: DOCS_INCLUDE_SOURCES(path...) -### -### Specify a list of paths to source code files which will be used as text includes in a documentation project. -### Paths must be Arcadia root relative. -### -### @see: [DOCS](#multimodule_DOCS) -macro DOCS_INCLUDE_SOURCES(Args...) { - SET_APPEND(_DOCS_INCLUDE_SOURCES_VALUE $Args) -} diff --git a/build/conf/java.ymake.conf b/build/conf/java.ymake.conf deleted file mode 100644 index ae6c31d8d2..0000000000 --- a/build/conf/java.ymake.conf +++ /dev/null @@ -1,212 +0,0 @@ -YMAKE_JAVA_MODULES=yes -JBUILD_JAVA_MODULES=no - -macro _INPUT_WITH_FLAG(Flag, IN[]) { - .CMD=$_INPUT_WITH_FLAG_IMPL(${pre=$Flag :IN} IN $IN) -} - -macro _INPUT_WITH_FLAG_IMPL(IN{input}[], Args...) { - .CMD=$Args ${input;hide:IN} -} - -macro ACCELEO(XSD{input}[], MTL{input}[], MTL_ROOT="${MODDIR}", LANG{input}[], OUT{output}[], OUT_NOAUTO{output}[], OUTPUT_INCLUDES[], DEBUG?"stdout2stderr":"stderr2stdout") { - .PEERDIR=build/platform/java/jdk $JDK_RESOURCE_PEERDIR - .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input;pre=build/scripts/:DEBUG.py} $JDK_RESOURCE/bin/java -Dfile.encoding=utf8 -classpath ${RUN_JAR_PROG_CP_PRE}${tool:"tools/acceleo"}${RUN_JAR_PROG_CP_SUF} ru.yandex.se.logsng.tool.Cli $_INPUT_WITH_FLAG(--xsd IN $XSD) $_INPUT_WITH_FLAG(--mtl IN $MTL) $_INPUT_WITH_FLAG(--lang IN $LANG) --output-dir $BINDIR --build-root ${ARCADIA_BUILD_ROOT} --source-root ${ARCADIA_ROOT} --mtl-root $MTL_ROOT ${output_include;hide:OUTPUT_INCLUDES} ${output;hide:OUT} ${output;noauto;hide:OUT_NOAUTO} ${kv;hide:"p JV"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} -} - -### @usage: JAVA_LIBRARY() -### -### The module describing java library build. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -module JAVA_LIBRARY: JAR_LIBRARY { -} - -### @usage: JAVA_PROGRAM() -### -### The module describing java programs build. -### Output artifacts: .jar and directory with all the jar to the classpath of the formation. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -multimodule JAVA_PROGRAM { - module JAR_RUNNABLE: _JAR_RUNNABLE { - .ALLOWED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE - # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: - # * A -> B -> C -> lib-v1.4 - # | |-> DM(lib-v1.1) - # | |-> EXCLUDE(lib-v1.4) - # | |-> FORBID_CONFLICT_DM_RECENT = OK - # |-> DM(lib-v1.1) - # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) - .IGNORED=RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION PROVIDES - .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE - .PEERDIRSELF=JAR_COMPILATION - - SET(MODULE_TYPE JAVA_PROGRAM) - } - module JAR_COMPILATION: JAR_LIBRARY { - .IGNORED=JAVA_RUNTIME_PEERDIR JAVA_RUNTIME_EXCLUDE - .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO - .FINAL_TARGET=no - SET(MODULE_TYPE JAVA_PROGRAM) - } -} - -multimodule JUNIT5 { - module JAR_TESTABLE: _JAR_TEST { - .ALLOWED=YT_SPEC - # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: - # * A -> B -> C -> lib-v1.4 - # | |-> DM(lib-v1.1) - # | |-> EXCLUDE(lib-v1.4) - # | |-> FORBID_CONFLICT_DM_RECENT = OK - # |-> DM(lib-v1.1) - # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) - .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - .PEERDIRSELF=JAR_COMPILATION - - PEERDIR(devtools/jtest-annotations/junit5) - - SET(MODULE_TYPE JUNIT5) - } - module JAR_COMPILATION: JAR_LIBRARY { - .ALLOWED=YT_SPEC - .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO - .FINAL_TARGET=no - .DEFAULT_NAME_GENERATOR=FullPath - - PEERDIR(devtools/junit5-runner devtools/jtest-annotations/junit5 build/platform/java/jacoco-agent) - SET(MODULE_TYPE JUNIT5) - } -} - -multimodule JTEST { - module JAR_TESTABLE: _JAR_TEST { - .ALLOWED=YT_SPEC - # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: - # * A -> B -> C -> lib-v1.4 - # | |-> DM(lib-v1.1) - # | |-> EXCLUDE(lib-v1.4) - # | |-> FORBID_CONFLICT_DM_RECENT = OK - # |-> DM(lib-v1.1) - # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) - .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - .PEERDIRSELF=JAR_COMPILATION - - SET(MODULE_TYPE JTEST) - PEERDIR(devtools/junit-runner devtools/jtest-annotations/junit4) - DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12) - } - module JAR_COMPILATION: JAR_LIBRARY { - .ALLOWED=YT_SPEC - .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO - .FINAL_TARGET=no - .DEFAULT_NAME_GENERATOR=FullPath - - SET(MODULE_TYPE JTEST) - DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) - PEERDIR(build/platform/java/jacoco-agent devtools/jtest-annotations/junit4) - } -} - -multimodule JTEST_FOR { - module JAR_TESTABLE: _JAR_TEST { - .ALLOWED=YT_SPEC - # TODO(svidyuk) JAVA_DEPENDENCIES_CONFIGURATION must not be ignored here but there are diagnostics issues in case of ECLUDE in the middle: - # * A -> B -> C -> lib-v1.4 - # | |-> DM(lib-v1.1) - # | |-> EXCLUDE(lib-v1.4) - # | |-> FORBID_CONFLICT_DM_RECENT = OK - # |-> DM(lib-v1.1) - # |-> FORBID_CONFLICT_DM_RECENT = FAIL (because downgrade from v1.4 to v1.1 is detected before understanding that v1.4 was excuded on the examined path) - .IGNORED=JAVA_SRCS RUN_JAVA_PROGRAM JAVA_DEPENDENCIES_CONFIGURATION - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - .PEERDIRSELF=JAR_COMPILATION - - SET(MODULE_TYPE JTEST_FOR) - PEERDIR(${UNITTEST_DIR} devtools/junit-runner) - DEPENDENCY_MANAGEMENT(contrib/java/com/google/code/gson/gson/2.8.6 contrib/java/com/beust/jcommander/1.72 contrib/java/junit/junit/4.12) - } - module JAR_COMPILATION: JAR_LIBRARY { - .ALLOWED=YT_SPEC - .ALIASES=JAVA_TEST_PEERDIR=_NOOP_MACRO JAVA_TEST_EXCLUDE=_NOOP_MACRO - .FINAL_TARGET=no - .DEFAULT_NAME_GENERATOR=FullPath - - SET(MODULE_TYPE JTEST_FOR) - DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) - PEERDIR(devtools/junit-runner build/platform/java/jacoco-agent ${UNITTEST_DIR}) - } -} - -multimodule JAVA_CONTRIB_PROGRAM { - module JAR_RUNNABLE: _JAR_RUNNABLE { - .IGNORED=JAVA_SRCS RUN_JAR_PROGRAM RUN_JAVA_PROGRAM JAR_RESOURCE SRC_RESOURCE LOCAL_JAR - .PEERDIRSELF=JAR_COMPILATION - - SET(MODULE_TYPE JAVA_PROGRAM) - ENABLE(DISABLE_SCRIPTGEN) - } - module JAR_COMPILATION: JAVA_CONTRIB { - .ALIASES=JAVA_RUNTIME_PEERDIR=_NOOP_MACRO JAVA_RUNTIME_EXCLUDE=_NOOP_MACRO - .FINAL_TARGET=no - } -} - -_EXPLICIT_SWIG_JAVA_SOURCES= -_EXPLICIT_SWIG_IFACE_SOURCES= -macro _EXPORT_JAVA_BINDINGS(JavaSrcs...) { - SET_APPEND(_EXPLICIT_SWIG_JAVA_SOURCES ${input:JavaSrcs}) - .SEM=find_package SWIG COMPONENTS java && find_package Java && find_package JNI && include UseSWIG && include UseJava ${input;hide:JavaSrcs} ${output;hide;pre=$_HASH_HELPER($Args):".o"} -} -macro _EXPORT_SWIG_SOURCES(SwigSrcs...) { - SET_APPEND(_EXPLICIT_SWIG_IFACE_SOURCES ${input:SwigSrcs}) -} - -macro _JNI_CPP_SWIG_SRCS(Srcs...) { - SRCS(${ext=.cpp:Srcs} ${ext=.swg:Srcs}) - _EXPORT_JAVA_BINDINGS(${ext=.java:Srcs}) - _EXPORT_SWIG_SOURCES(${ext=.swg:Srcs}) -} -macro _JNI_JAVA_SWIG_SRCS(Srcs...) { - SRCS(${ext=.java:Srcs} ${ext=.swg:Srcs}) -} - -SWIG_JNI_BINDINGS_SEM= \ - add_swig_jni_library ${MODDIR} ${REALPRJNAME}-cpp GEN_JAVA_FILES_LIST ${"$"}{CMAKE_CURRENT_BINARY_DIR}/swig_gen_java.lst SOURCES ${_EXPLICIT_SWIG_IFACE_SOURCES} && \ - set_target_property OUTPUT_NAME $REALPRJNAME && \ - vcs_info && \ - add_jar ${REALPRJNAME} SOURCES $_EXPLICIT_SWIG_JAVA_SOURCES @${"$"}{CMAKE_CURRENT_BINARY_DIR}/swig_gen_java.lst ${hide:TARGET} - -### @usage: DLL_JAVA() -### -### DLL built using swig for Java. Produces dynamic library and a .jar. -### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL. -### .jar goes on the classpath. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj -multimodule DLL_JAVA { - module JNI_DLL: DLL { - .ALIASES=SRCS=_JNI_CPP_SWIG_SRCS - .FINAL_TARGET=no - .SEM=SWIG_JNI_BINDINGS_SEM - SWIG_LANG=jni_cpp - } - module JAR_COMPILATION: EXTERNAL_JAVA_LIBRARY { - .ARGS_PARSER=DLL - .ALIASES=SRCS=_JNI_JAVA_SWIG_SRCS PEERDIR=_NOOP_MACRO - .PEERDIRSELF=JNI_DLL - PEERDIR+=build/platform/java/jdk - PEERDIR+=$JDK_RESOURCE_PEERDIR - SET(DONT_RESOLVE_INCLUDES yes) - .FINAL_TARGET=yes - - SWIG_LANG=jni_java - _SWIG_CMD=$_SWIG_JNI_JAVA_CMD - _SWIG_ADDINCLS=$_SWIG_JNI_ADDINCLS - _SWIG_PEERDIR=$_SWIG_JNI_PEERDIR - _SWIG_SEM_TO_MODULE_LINK=${output;hide;suf=.jsrc:SRC} - } -} diff --git a/build/conf/jbuild.ymake.conf b/build/conf/jbuild.ymake.conf deleted file mode 100644 index b9c88dd2db..0000000000 --- a/build/conf/jbuild.ymake.conf +++ /dev/null @@ -1,124 +0,0 @@ -YMAKE_JAVA_MODULES=no -JBUILD_JAVA_MODULES=yes - -EXTERNAL_JAR_VALUE= -### @usage: EXTERNAL_JAR(library.jar) -### -### Provide an external name for built JAVA_LIBRARY() or JAVA_PROGRAM() -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/#ispolzovanievneshnixmavenbibliotek -macro EXTERNAL_JAR(Args...) { - SET_APPEND(EXTERNAL_JAR_VALUE $ARGS_DELIM $Args) -} - -### @usage: JAVA_LIBRARY() -### -### The module describing java library build. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -module JAVA_LIBRARY: _JAVA_PLACEHOLDER { - SET(MODULE_TYPE JAVA_LIBRARY) -} - -### @usage: JAVA_PROGRAM() -### -### The module describing java programs build. -### Output artifacts: .jar and directory with all the jar to the classpath of the formation. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/ -module JAVA_PROGRAM: _JAVA_PLACEHOLDER { - .ALIASES=JAVA_RUNTIME_PEERDIR=PEERDIR JAVA_RUNTIME_EXCLUDE=EXCLUDE - SET(MODULE_TYPE JAVA_PROGRAM) -} - -### @usage: JUNIT5() -### -### Java tests module based on JUnit 5 framework. -### -### If requested, build system will scan the source code of the module for the presence of junit tests and run them. -### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc. -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava -module JUNIT5: _JAVA_PLACEHOLDER { - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - SET(MODULE_TYPE JUNIT5) - SET(TEST_RUNNER devtools/junit5-runner) - SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER}) - PEERDIR(devtools/jtest-annotations/junit5) - # Used as place to add managed dependencies for test execution and take them into account - # during traverses properly. - _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd) - - PEERDIR(${TEST_RUNNER}) - PEERDIR(build/platform/java/jacoco-agent) - JAVA_TEST() -} - -### @usage: JTEST() -### -### Java tests module based on JUnit 4 framework. -### -### If requested, build system will scan the source code of the module for the presence of junit tests and run them. -### Output artifacts: a jar, a directory of exhaust tests(if required run the tests) - test logs, system logs testiranja, temporary files, tests, etc. -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava -module JTEST: _JAVA_PLACEHOLDER { - .ALLOWED=YT_SPEC - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - SET(MODULE_TYPE JTEST) - SET(TEST_RUNNER devtools/junit-runner) - SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER}) - # Used as place to add managed dependencies for test execution and take them into account - # during traverses properly. - _RUN_JAVA(TOOL ${TEST_RUNNER} OUT fake.out.java_test_cmd) - - PEERDIR(devtools/jtest-annotations/junit4) - - # TODO: if <needs_sonar> - DEPENDS(contrib/java/org/sonarsource/scanner/cli/sonar-scanner-cli/2.8) - DEPENDS(${TEST_RUNNER}) - _GHOST_PEERDIR(${TEST_RUNNER}) - PEERDIR(build/platform/java/jacoco-agent) - JAVA_TEST() - - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) -} - -### @usage: JTEST_FOR(ModuleDir) -### -### Convinience java tests module based on JUnit 4 framework for specified library or program. -### -### In contrast to the JTEST, the build system will scan for the presence of the test sources of the module in ModuleDir . As ModuleDir should contain JAVA_PROGRAM or JAVA_LIBRARY . JTEST_FOR also can have its own source, in this case they will be compiled and added to the classpath of a test run. -### Output artifacts: a jar, a directory of exhaust tests(if requested tests are run). -### -### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynajava -module JTEST_FOR: JTEST { - .ALIASES=JAVA_TEST_PEERDIR=PEERDIR JAVA_TEST_EXCLUDE=EXCLUDE - SET(MODULE_TYPE JTEST_FOR) - SET(TEST_CLASSPATH_VALUE ${MODDIR} ${TEST_RUNNER} ${UNITTEST_DIR}) - - PEERDIR(devtools/jtest-annotations/junit4 $UNITTEST_DIR) - SET(REALPRJNAME jtest) - JAVA_TEST() -} - -module JAVA_CONTRIB_PROGRAM: JAVA_CONTRIB { - SET(MODULE_TYPE JAVA_PROGRAM) - ENABLE(DISABLE_SCRIPTGEN) -} - -### @usage: DLL_JAVA() -### -### DLL built using swig for Java. Produces dynamic library and a .jar. -### Dynamic library is treated the same as in the case of PEERDIR from Java to DLL. -### .jar goes on the classpath. -### -### Documentation: https://wiki.yandex-team.ru/yatool/java/#integracijascpp/pythonsborkojj -module DLL_JAVA: DLL { - .EXTS=.o .obj .jsrc .java .mf - .CMD=SWIG_DLL_JAR_CMD - PEERDIR(build/platform/java/jdk) - PEERDIR+=$JDK_RESOURCE_PEERDIR - - SWIG_LANG=java -} diff --git a/build/conf/license.conf b/build/conf/license.conf deleted file mode 100644 index d956a47a99..0000000000 --- a/build/conf/license.conf +++ /dev/null @@ -1,398 +0,0 @@ -LICENSE_EXPRESSION_IMPLICIT_OR=yes -LICENSE_EXPRESSION_IMPLICIT_AND=yes -LICENSE_EXPRESSION= -LICENSE_NAMES= - -MODULE_LICENSES_RESTRICTIONS= -MODULE_LICENSES_RESTRICTION_EXCEPTIONS= -MODULE_LICENSES_RESTRICTION_TYPES= -DEFAULT_MODULE_LICENSE=YandexUncategorized -EXPLICIT_LICENSE_PREFIXES= - -# List of license properties which can be used to restrict transitive dependencies. There are three variables checked for each -# property: -# * LICENSES_<PROP_NAME>_STATIC: list of licenses which propagates this property when linking with code published by one of -# them statically. -# * LICENSES_<PROP_NAME>_DYNAMIC: list of licenses which propagates this property when linking with code published by one of -# them dyamically. -# * LICENSES_<PROP_NAME>: list of licenses which propagates this property regrdless of type of linking with code published by -# one of them. Putting some license into this list is equivalent to putting it into both -# LICENSES_<PROP_NAME>_STATIC and LICENSES_<PROP_NAME>_DYNAMIC lists. -LICENSE_PROPERTIES= \ - FORBIDDEN NDA REQUIRE_DISCLOSURE PERMISSIVE REQUIRE_CITATION SERVICE - -LICENSES_UNATTRIBUTED= \ - AFL-2.0 \ - AML \ - APSL-1.0 \ - ASM-BSD-3-Clause \ - Amazon-SL \ - Artistic-1.0-Perl \ - BCL \ - BSD-3-Clause-Open-MPI \ - BSD-3-Clause-Clear \ - BSD-4-Clause-Shortened \ - BSLA \ - Bison-Exception \ - Bison-exception-2.2 \ - BouncyCastle-MIT \ - Bsd-New-Tcpdump \ - Bsd-Original-Uc-1986 \ - CC-BY-1.0 \ - CC-BY-2.0 \ - CC-BY-2.5 \ - CC-BY-3.0 \ - CC-BY-4.0 \ - CC-BY-NC-1.0 \ - CC-BY-NC-2.0 \ - CC-BY-NC-2.5 \ - CC-BY-NC-3.0 \ - CC-BY-NC-ND-1.0 \ - CC-BY-NC-ND-2.0 \ - CC-BY-NC-ND-2.5 \ - CC-BY-NC-ND-3.0 \ - CC-BY-NC-SA-1.0 \ - CC-BY-NC-SA-2.0 \ - CC-BY-NC-SA-2.5 \ - CC-BY-NC-SA-3.0 \ - CC-BY-ND-1.0 \ - CC-BY-ND-2.0 \ - CC-BY-ND-2.5 \ - CC-BY-ND-3.0 \ - CC-BY-SA-1.0 \ - CC-BY-SA-2.0 \ - CC-BY-SA-2.5 \ - CC-BY-SA-3.0 \ - CC-BY-SA-4.0 \ - CDDL \ - CECILL-B \ - Carnegie-Mellon \ - Carnegie-Mellon-Contributors \ - DOC \ - DSO-1.1 \ - EDL-1.0 \ - Elastic-License-2.0 \ - FSFUL \ - FSFULLR \ - Fftpack-2004 \ - GCC-exception-3.1 \ - GDAL \ - GFDL-1.1-or-later \ - GPL-2.0 WITH Classpath-exception-2.0 \ - GPL-2.0 WITH FOSS-exception \ - GPL-2.0-only WITH Mysql-Linking-Exception-2018 \ - GPL-2.0-only WITH Universal-FOSS-exception-1.0 \ - GPL-2.0-or-later WITH Avisynth-C-Interface-Exception \ - GPL-2.0-or-later WITH Bison-Exception-2.0 \ - GPL-2.0-or-later WITH Bison-exception-2.2 \ - GPL-2.0-or-later WITH C-Interface-Exception \ - GPL-2.0-or-later WITH Libtool-exception \ - GPL-2.0-or-later WITH mif-exception \ - Go-License \ - Google-Patent-License-Webm \ - Google-Patent-License-Webrtc \ - GWT-Terms \ - HPND \ - HPND-sell-variant \ - HPND-sell-variant \ - HSQLDB-BSD-3-Clause \ - Hdf5 \ - IPL-1.0 \ - Ibm-Dhcp \ - Ietf-trust \ - ImageMagick \ - Info-Zip \ - Intel-Confidential \ - Intel-Material \ - JAMon-BSD-3-Clause \ - LGPL-3.0-or-later WITH ZeroMQ-Exception \ - LPL-1.02 \ - LicenseRef-scancode-afpl-9.0 \ - LicenseRef-scancode-bsd-new-nomod \ - LicenseRef-scancode-cc-by-2.0-uk \ - LicenseRef-scancode-cc-devnations-2.0 \ - LicenseRef-scancode-cc-sampling-1.0 \ - LicenseRef-scancode-flex-2.5 \ - LicenseRef-scancode-free-unknown \ - LicenseRef-scancode-generic-cla \ - LicenseRef-scancode-generic-exception \ - LicenseRef-scancode-mit-xfig \ - LicenseRef-scancode-other-copyleft \ - LicenseRef-scancode-other-permissive \ - LicenseRef-scancode-pcre \ - LicenseRef-scancode-proprietary-license \ - LicenseRef-scancode-secret-labs-2011 \ - LicenseRef-scancode-swig \ - LicenseRef-scancode-unknown \ - LicenseRef-scancode-unknown-spdx \ - LicenseRef-scancode-unknown-license-reference \ - LicenseRef-scancode-warranty-disclaimer \ - LicenseRef-scancode-xfree86-1.0 \ - MirOS \ - Mit-Xfig \ - Mozilla-GC \ - NAIST-2003 \ - Nvidia-Gov \ - Oracle \ - Oracle-technology \ - PSF-3.7.2 \ - Qhull \ - Quicklz \ - Ruby \ - SSPL-1.0 \ - SZIP \ - Sendmail \ - Softsurfer \ - Spencer-99 \ - Stlport-4.5 \ - TCL \ - TU-Berlin-1.0 \ - Unicode-TOU \ - Universal-FOSS-exception-1.0 \ - Unknown \ - Vcalendar \ - Vim \ - X11-Adobe-Dec \ - X11-Hanson \ - X11-XConsortium-Veillard \ - Xfree86-1.0 \ - Xnet \ - jQuery-MIT - -LICENSES_PATCHES_FORBIDDEN= \ - Unicode - -LICENSES_FORBIDDEN= \ - AGPL-3.0-only \ - AGPL-3.0-or-later \ - Artistic-1.0 \ - Musl-Exception \ - ${LICENSES_UNATTRIBUTED} - -# Group for proprietary code licenses -LICENSES_NDA= \ - Intel-NDA \ - mimepp \ - OracleOebs \ - Sophos-SDK \ - YandexUncategorized \ - YandexNDA - -# These licenses allow use with opensource code only -LICENSES_REQUIRE_DISCLOSURE= \ - CDDL-1.0 \ - CDDL-1.1 \ - CECILL-2.0 \ - CPL-1.0 \ - EPL-1.0 \ - EPL-2.0 \ - GPL \ - GPL-1.0-only \ - GPL-1.0-or-later \ - GPL-1.0-or-later WITH Linux-syscall-note \ - GPL-1.1 \ - GPL-2.0 \ - GPL-2.0-only \ - GPL-2.0-only WITH GCC-exception-2.0 \ - GPL-2.0-only WITH Linux-syscall-note \ - GPL-2.0-or-later \ - GPL-2.0-or-later WITH GCC-exception-2.0 \ - GPL-2.0-or-later WITH Linux-syscall-note \ - GPL-3.0-only \ - GPL-3.0-only WITH Bison-exception-2.2 \ - GPL-3.0-or-later \ - GPL-3.0-or-later WITH Bison-exception-2.2 - -LICENSES_REQUIRE_DISCLOSURE_STATIC= \ - LGPL \ - LGPL-1.0-or-later \ - LGPL-2.0-only \ - LGPL-2.0-or-later \ - LGPL-2.0-or-later WITH Libtool-exception \ - LGPL-2.0-or-later WITH Linux-syscall-note \ - LGPL-2.1-only \ - LGPL-2.1-only WITH Linux-syscall-note \ - LGPL-2.1-or-later \ - LGPL-2.1-or-later WITH Linux-syscall-note \ - LGPL-3.0-only \ - LGPL-3.0-or-later - -# These licenses allows any kind of linkage with proprietary code -LICENSES_PERMISSIVE= \ - 0BSD \ - Apache-1.0 \ - Apache-1.1 \ - Apache-2.0 \ - Apache-2.0 WITH LLVM-exception \ - APSL-2.0 \ - Beerware \ - blessing \ - BSL-1.0 \ - BSD \ - BSD-1-Clause \ - BSD-2-Clause \ - BSD-2-Clause-Patent \ - BSD-2-Clause-Views \ - BSD-3-Clause \ - BSD-4-Clause \ - BSD-4-Clause-UC \ - BSD-derived \ - BSD-ORIGINAL-UC-1986 \ - BSD-Source-Code \ - Bsd-Simplified-Darwin \ - Bsd-Unchanged \ - Bsd-Unmodified \ - bzip2-1.0.6 \ - CC0-1.0 \ - CC-PDDC \ - Cmu-Computing-Services \ - CUP-Parser \ - curl \ - Custom-Punycode \ - Facebook-SDK \ - FDK \ - FSFAP \ - FTL \ - H2 \ - IBM-pibs \ - ICU \ - Ietf \ - IJG \ - Intel-LLVM-SGA \ - Intel-Simplified \ - ISC \ - JSON \ - Khronos \ - Libpbm \ - LicenseRef-scancode-bitstream \ - LicenseRef-scancode-ams-fonts \ - Linux-OpenIB \ - Libpng \ - libpng-2.0 \ - libtiff \ - Martin-Birgmeier \ - MIT \ - MIT-0 \ - MIT-CMU \ - MIT-Modern-Variant \ - MIT-Nagy \ - MIT-open-group \ - Mit-Old-Style \ - Mit-Veillard-Variant \ - MPL-1.0 \ - MPL-1.1 \ - MPL-2.0 \ - Minpack \ - NCSA \ - NTP \ - Not-Applicable \ - Nvidia \ - OGC-1.0 \ - OLDAP-2.8 \ - OML \ - OpenSSL \ - PayPal-SDK \ - PCRE \ - PD \ - Public-Domain \ - Public-Domain-US-Govt \ - PHP-3.01 \ - PIL \ - Plexus \ - PostgreSQL \ - Protobuf-License \ - PSF \ - PSF-2.0 \ - Python-2.0 \ - Qhull \ - Red-Hat-Attribution \ - Repoze-public \ - RSA-MD \ - RSA-MD4 \ - RSA-1990 \ - Sleepycat \ - Snprintf \ - SGI-B-2.0 \ - SMLNJ \ - SSH-short \ - SSLeay \ - Sunpro \ - Unicode-DFS-2016 \ - Unicode-Icu-58 \ - Unicode-Mappings \ - Unlicense \ - Unrar \ - UPL-1.0 \ - Vertica \ - W3C \ - WTFPL \ - X11 \ - X11-Lucent \ - YandexOpen \ - Zlib \ - zlib-acknowledgement \ - ZPL-2.1 \ - ${CUSTOM_LICENSE_MUSL_EXCEPTION} \ - ${LICENSES_PATCHES_FORBIDDEN} - -LICENSES_PERMISSIVE_DYNAMIC= \ - LGPL \ - LGPL-2.0-only \ - LGPL-2.0-or-later \ - LGPL-2.1-only \ - LGPL-2.1-or-later \ - LGPL-3.0-only \ - LGPL-3.0-or-later - -# https://st.yandex-team.ru/ARCADIAWGSUP-34 -CUSTOM_LICENSE_LIBSSH2_AGENT_WIN=Libssh2-Agent-Win -# Permissive only in musllib -CUSTOM_LICENSE_MUSL_EXCEPTION=Musl-Exception-in-Musllib - -# TODO: this list is almost empty. needed for DEVRULES-151 -LICENSES_REQUIRE_CITATION= \ - Apache-2.0 \ - Brian-Gladman-3-Clause \ - Cmu-Computing-Services \ - Custom-Oasis-Pkcs11 \ - OpenSSL \ - Spencer-94 \ - NetCDF \ - ${CUSTOM_LICENSE_LIBSSH2_AGENT_WIN} - -LICENSES_SERVICE= \ - Service-Dll-Harness \ - Service-Prebuilt-Tool \ - Service-Py23-Proxy - -macro _REQUIRE_EXPLICIT_LICENSE(Prefix...) { - SET(EXPLICIT_LICENSE_PREFIXES ${Prefix}) -} - -### @usage: LICENSE(licenses...) -### -### Specify the licenses of the module, separated by spaces. Specifying multiple licenses interpreted as permission to use this -### library satisfying all conditions of any of the listed licenses. -### -### A license must be prescribed for contribs -macro LICENSE(Flags...) { - SET(LICENSE_EXPRESSION $Flags) - SET(LICENSE_NAMES $Flags) -} - -### @usage RESTRICT_LICENSES(ALLOW_ONLY|DENY LicenseProperty...) -### -### Restrict licenses of direct and indirect module dependencies. -### -### ALLOW_ONLY restriction type requires dependent module to have at leas one license without propertis not listed in restrictions -### list. -### -### DENY restriction type forbids dependency on module with no license without any listed propery from the list. -### -### Note: Can be used multiple times on the same module all specified constraints will be checked. -### All macro invocation for the same module must use same constraints type (DENY or ALLOW_ONLY) -macro RESTRICT_LICENSES(TYPE, EXCEPT[], RESTRICTIONS...) { - SET_APPEND(MODULE_LICENSES_RESTRICTION_TYPES $TYPE) - SET_APPEND(MODULE_LICENSES_RESTRICTIONS $RESTRICTIONS) - SET_APPEND(MODULE_LICENSES_RESTRICTION_EXCEPTIONS $EXCEPT) -} diff --git a/build/conf/linkers/ld.conf b/build/conf/linkers/ld.conf deleted file mode 100644 index 6b1b564b39..0000000000 --- a/build/conf/linkers/ld.conf +++ /dev/null @@ -1,373 +0,0 @@ -_LD_FLAGS_1= -_LD_FLAGS_2= -when ($MUSL == "yes") { - _LD_FLAGS_1=-Wl,--no-as-needed -} -elsewhen ($OS_LINUX == "yes") { - _LD_FLAGS_1=-ldl -lrt -Wl,--no-as-needed - when ($GCC == "yes") { - _LD_FLAGS_2=-Wl,-Bstatic -latomic -Wl,-Bdynamic - } -} -elsewhen ($OS_ANDROID == "yes") { - _LD_FLAGS_1=-ldl -Wl,--no-as-needed -} -elsewhen ($OS_DARWIN == "yes") { - _LD_FLAGS_1=-Wl,-no_deduplicate - when ($CLANG != "yes") { - _LD_FLAGS_2=-Wl,-no_compact_unwind - } -} - -_LD_FLAGS_IOS_MAPSMOBI_ARM= -when ($OS_IOS == "yes" && $MAPSMOBI_BUILD_TARGET == "yes" && $ARCH_ARM) { - _LD_FLAGS_IOS_MAPSMOBI_ARM=-fembed-bitcode -Wl,-bitcode_verify -} - -_LD_FLAGS_PROFILER_TYPE= -when ($_BUILD_PROFILER_TYPE == "gprof") { - _LD_FLAGS_PROFILER_TYPE=-pg -} - -_LD_FLAGS_COVERAGE= -when ($_BUILD_COVERAGE == "yes") { - _LD_FLAGS_COVERAGE=-fprofile-arcs -ftest-coverage -} - -_LD_FLAGS = -_LD_FLAGS+=$_LD_FLAGS_1 -_LD_FLAGS+=$_LD_FLAGS_2 -_LD_FLAGS+=$_LD_FLAGS_IOS_MAPSMOBI_ARM -_LD_FLAGS+=$_LD_FLAGS_PROFILER_TYPE -_LD_FLAGS+=$_LD_FLAGS_COVERAGE -_LD_FLAGS+=$LD_SDK_VERSION - -LDFLAGS+=$USER_LDFLAGS $_LD_FLAGS -LDFLAGS_GLOBAL+= - -_START_GROUP= -_END_GROUP= -START_WHOLE_ARCHIVE_VALUE= -END_WHOLE_ARCHIVE_VALUE= -LD_STRIP_FLAG= -_SONAME_OPTION= -_LD_SRCS_GLOBALS=--start-wa ${rootrel;ext=.a:SRCS_GLOBAL} --end-wa ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL} -when ($OS_LINUX == "yes" || $OS_ANDROID == "yes" || $OS_CYGWIN == "yes" || $OS_NONE == "yes") { - _START_GROUP=-Wl,--start-group - _END_GROUP=-Wl,--end-group - START_WHOLE_ARCHIVE_VALUE=-Wl,--whole-archive - END_WHOLE_ARCHIVE_VALUE=-Wl,--no-whole-archive - LD_STRIP_FLAG=-s - _SONAME_OPTION=-soname - _LD_SRCS_GLOBALS=-Wl,--whole-archive ${rootrel;ext=.a:SRCS_GLOBAL} -Wl,--no-whole-archive ${rootrel;ext=.o:SRCS_GLOBAL} ${rootrel;ext=.supp:SRCS_GLOBAL} -} - -when ($_LD_WHOLE_ARCHIVE == "yes") { -} - -when ($OS_DARWIN == "yes" || $OS_IOS == "yes") { - _SONAME_OPTION=-install_name -} - -_LD_LINKER_OUTPUT= -_LD_LINKER_OUTPUT_FLAG=--linker-output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX$MODULE_VERSION.linker.txt:REALPRJNAME} - -# Enable section-level DCE (dead code elimination): -# remove whole unused code and data sections -# (needs `-ffunction-sections` and `-fdata-sections` to be useful) -# -# NOTE: CGO linker doesn't seem to support DCE, but shares common LDFLAGS -_LD_DCE_FLAG_GC_SECTIONS= -_LD_DCE_FLAG_PRINT_SECTIONS= -when ($OS_DARWIN == "yes") { - _LD_DCE_FLAG_GC_SECTIONS=-Wl,-dead_strip -} -elsewhen ($OS_LINUX == "yes" || $OS_ANDROID == "yes") { - _LD_DCE_FLAG_GC_SECTIONS=-Wl,--gc-sections - when ($LINKER_DCE_PRINT_SECTIONS == "yes") { - _LD_DCE_FLAG_PRINT_SECTIONS=-Wl,--print-gc-sections - _LD_LINKER_OUTPUT=$_LD_LINKER_OUTPUT_FLAG - } -} -LD_DCE_FLAG = -LD_DCE_FLAG+=$_LD_DCE_FLAG_GC_SECTIONS -LD_DCE_FLAG+=$_LD_DCE_FLAG_PRINT_SECTIONS -DCE_FLAG= - -_LD_ICF_FLAG= -_LD_ICF_FLAG_PRINT_SECTIONS= -when ($_DEFAULT_LINKER_ID == "lld") { - # Enable ICF (identical code folding pass) in safe mode - # https://research.google/pubs/pub36912/ - _LD_ICF_FLAG=-Wl,-icf=safe - when ($LINKER_ICF_PRINT_SECTIONS == "yes") { - _LD_ICF_FLAG_PRINT_SECTIONS=-Wl,--print-icf-sections - _LD_LINKER_OUTPUT=$_LD_LINKER_OUTPUT_FLAG - } -} -LD_ICF_FLAG = -LD_ICF_FLAG+=$_LD_ICF_FLAG -LD_ICF_FLAG+=$_LD_ICF_FLAG_PRINT_SECTIONS -ICF_FLAG= - -STRIP_FLAG= - -C_LIBRARY_PATH= -C_SYSTEM_LIBRARIES_INTERCEPT= - -_LD_THREAD_LIBRARY= -when ($OS_LINUX == "yes" || $OS_DARWIN == "yes") { - _LD_THREAD_LIBRARY=-lpthread -} - -_LD_USE_STDLIB= -when ($_BUILD_COVERAGE == "yes" || $GCOV_COVERAGE == "yes" || $CLANG_COVERAGE == "yes" || $_BUILD_SANITIZED == "yes") { - _LD_USE_STDLIB= -} -elsewhen ($OS_ANDROID == "yes") { - when ($_ANDROID_NDK_VERSION_LESS_THEN_23 == "yes") { - # Preserve old behaviour: specify runtime libs manually - _LD_USE_STDLIB=-nodefaultlibs - } - otherwise { - # Use toolchain defaults to link with libunwind/clang_rt.builtins - _LD_USE_STDLIB=-nostdlib++ - } -} -elsewhen ($OS_LINUX == "yes" || $OS_DARWIN == "yes" || $OS_IOS == "yes") { - _LD_USE_STDLIB=-nodefaultlibs -} - -_C_SYSTEM_LIBRARIES=$_LD_USE_STDLIB $_LD_THREAD_LIBRARY $_LD_SYS_LIB -lc -when ($MUSL == "yes") { - _C_SYSTEM_LIBRARIES=-nostdlib -} -C_SYSTEM_LIBRARIES=$_C_SYSTEM_LIBRARIES - -OBJADDE= - -LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG= -when ($OS_LINUX == "yes" || $OS_ANDROID == "yes") { - LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG=-rdynamic -} - -NO_EXPORT_DYNAMIC_SYMBOLS= -EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG -when ($EXPORTS_FILE) { - EXPORTS_VALUE=$LD_EXPORT_ALL_DYNAMIC_SYMBOLS_FLAG -Wl,--version-script=${input:EXPORTS_FILE} -} -when ($NO_EXPORT_DYNAMIC_SYMBOLS == "yes") { - EXPORTS_VALUE= -} - -LINKER_SCRIPT_VALUE=${ext=.ld;pre=-T:SRCS_GLOBAL} - -_LINKER_TIME_TRACE_GRANULARITY=500 -when ($TIME_TRACE_GRANULARITY && $TIME_TRACE_GRANULARITY != "") { - _LINKER_TIME_TRACE_GRANULARITY=$TIME_TRACE_GRANULARITY -} - -_LINKER_TIME_TRACE_FLAG= -when (($TIME_TRACE == "yes" || $LINKER_TIME_TRACE == "yes") && $_DEFAULT_LINKER_ID == "lld") { - _LINKER_TIME_TRACE_FLAG=\ - -Wl,--time-trace \ - -Wl,--time-trace-granularity=$_LINKER_TIME_TRACE_GRANULARITY \ - -Wl,--time-trace-file=${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.time_trace.json:REALPRJNAME} -} - -_EXE_FLAGS=\ - $C_FLAGS_PLATFORM \ - $BEFORE_PEERS \ - $_START_GROUP \ - ${rootrel:PEERS} \ - $_END_GROUP \ - $AFTER_PEERS \ - $EXPORTS_VALUE \ - $LINKER_SCRIPT_VALUE \ - $LDFLAGS \ - $LDFLAGS_GLOBAL \ - $OBJADDE \ - $OBJADDE_LIB \ - $C_LIBRARY_PATH \ - $C_SYSTEM_LIBRARIES_INTERCEPT \ - $C_SYSTEM_LIBRARIES \ - $STRIP_FLAG \ - $DCE_FLAG \ - $ICF_FLAG \ - $_LINKER_TIME_TRACE_FLAG - -_SONAME_FLAG=-Wl,$_SONAME_OPTION,$_SONAME -_SHARED_FLAG=-shared -_EXEC_SHARED_FLAG= -when ($OS_LINUX == "yes") { - _EXEC_SHARED_FLAG=-pie -fPIE -Wl,--unresolved-symbols=ignore-all -rdynamic -} - -_LD_ENV_STYLE=${cwd:ARCADIA_BUILD_ROOT} $TOOLCHAIN_ENV ${kv;hide:"p LD"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} - -# Program -GENERATE_MF_CMD=\ - $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${input;hide:"build/scripts/process_command_files.py"} \ - --build-root $ARCADIA_BUILD_ROOT \ - --module-name $REALPRJNAME \ - -o ${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \ - -t $MODULE_TYPE \ - --ya-start-command-file \ - -Ya,lics $LICENSE_NAMES \ - -Ya,peers ${rootrel:PEERS} \ - -Ya,credits ${input:CREDITS_TEXTS_FILE} $CREDITS_FLAGS \ - --ya-end-command-file - -LINK_SCRIPT_EXE_FLAGS= - -REAL_LINK_EXE_CMDLINE =\ - $YMAKE_PYTHON ${input:"build/scripts/link_exe.py"} \ - --source-root $ARCADIA_ROOT - REAL_LINK_EXE_CMDLINE+=$_LD_LINKER_OUTPUT - REAL_LINK_EXE_CMDLINE+=\ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - $_LD_ARCH_FLAG \ - $LINK_SCRIPT_EXE_FLAGS \ - $CXX_COMPILER \ - $_LD_SRCS_GLOBALS \ - $VCS_C_OBJ $AUTO_INPUT -o $TARGET \ - $_EXE_FLAGS \ - $_LD_ENV_STYLE - -REAL_LINK_EXE_TIDY=\ - $YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} \ - --build-root $ARCADIA_BUILD_ROOT \ - --source-root $ARCADIA_ROOT \ - --output-file $TARGET \ - $AUTO_INPUT \ - $_LD_ENV_STYLE - -# Executable Shared Library - -REAL_LINK_EXEC_DYN_LIB_CMDLINE =\ - $YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"} \ - --target $TARGET -REAL_LINK_EXEC_DYN_LIB_CMDLINE+=$_LD_LINKER_OUTPUT -REAL_LINK_EXEC_DYN_LIB_CMDLINE+=\ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - $_LD_ARCH_FLAG \ - $LINK_DYN_LIB_FLAGS \ - $CXX_COMPILER \ - $_LD_SRCS_GLOBALS \ - $VCS_C_OBJ $AUTO_INPUT -o $TARGET \ - $_EXEC_SHARED_FLAG \ - $_SONAME_FLAG \ - $_EXE_FLAGS \ - $_LD_ENV_STYLE - -REAL_LINK_EXEC_DYN_LIB=$REAL_LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) - -# Shared Library - -LINK_DYN_LIB_FLAGS= - -REAL_LINK_DYN_LIB_CMDLINE =\ - $YMAKE_PYTHON ${input:"build/scripts/link_dyn_lib.py"} \ - --target $TARGET -REAL_LINK_DYN_LIB_CMDLINE+=$_LD_LINKER_OUTPUT -REAL_LINK_DYN_LIB_CMDLINE+=\ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - $_LD_ARCH_FLAG \ - $LINK_DYN_LIB_FLAGS \ - $CXX_COMPILER \ - $_LD_SRCS_GLOBALS \ - $VCS_C_OBJ $AUTO_INPUT -o $TARGET \ - $_SHARED_FLAG \ - $_SONAME_FLAG \ - $_EXE_FLAGS \ - $_LD_ENV_STYLE - -REAL_LINK_DYN_LIB=$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) - -_DWARF_COMMAND= -when ($OS_DARWIN == "yes" && $NO_DEBUGINFO != "yes") { - _DWARF_COMMAND=$DWARF_TOOL $TARGET -o ${output;pre=$MODULE_PREFIX$REALPRJNAME.dSYM/Contents/Resources/DWARF/$MODULE_PREFIX:REALPRJNAME} $_LD_ENV_STYLE -} -DWARF_COMMAND=$_DWARF_COMMAND - -_REAL_LINK_EXE=$REAL_LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) -_LINK_EXE=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_EXE && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND && $PACK_IOS_CMD -_LINK_DYN_LIB=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB && $DWARF_COMMAND && $LINK_ADDITIONAL_SECTIONS_COMMAND -when ($TIDY == "yes") { - _REAL_LINK_EXE=$REAL_LINK_EXE_TIDY - _LINK_EXE=$REAL_LINK_EXE - _LINK_DYN_LIB=$REAL_LINK_EXE -} -REAL_LINK_EXE=$_REAL_LINK_EXE -LINK_EXE=$_LINK_EXE -LINK_DYN_LIB=$_LINK_DYN_LIB - -LINK_EXEC_DYN_LIB=\ - $GENERATE_MF && \ - $GENERATE_VCS_C_INFO_NODEP && \ - $REAL_LINK_EXEC_DYN_LIB && \ - $DWARF_COMMAND && \ - $LINK_ADDITIONAL_SECTIONS_COMMAND - -SWIG_DLL_JAR_CMD=\ - $GENERATE_MF && \ - $GENERATE_VCS_C_INFO_NODEP && \ - $REAL_SWIG_DLL_JAR_CMD && \ - $DWARF_COMMAND - -_LD_TAIL_LINK_LIB=$AUTO_INPUT ${kv;hide:"p AR"} $TOOLCHAIN_ENV ${kv;hide:"pc light-red"} ${kv;hide:"show_out"} -_LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/link_lib.py"} ${quo:AR_TOOL} $AR_TYPE $_LD_LLVM_AR_FORMAT $ARCADIA_BUILD_ROOT $_LD_AR_PLUGIN -_LD_LIB_GENERATE_MF=$GENERATE_MF && -when ($TIDY == "yes") { - _LD_ARCHIVER=$YMAKE_PYTHON ${input:"build/scripts/clang_tidy_arch.py"} --source-root $ARCADIA_ROOT --build-root $ARCADIA_BUILD_ROOT --output-file - _LD_LIB_GENERATE_MF= -} -LINK_LIB=$_LD_LIB_GENERATE_MF $_LD_ARCHIVER $TARGET $_LD_TAIL_LINK_LIB -GLOBAL_LINK_LIB=$_LD_ARCHIVER $GLOBAL_TARGET $_LD_TAIL_LINK_LIB - -# "Fat Object" : pre-linked global objects and static library with all dependencies -_LD_LINK_FAT_PREFIX=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $YMAKE_PYTHON ${input:"build/scripts/link_fat_obj.py"} --build-root $ARCADIA_BUILD_ROOT -_LD_LINK_FAT_SRCS_GLOBALS_WA=$_LD_SRCS_GLOBALS -_LD_LINK_FAT_SRCS_GLOBALS_NO_WA=${rootrel;ext=.a:SRCS_GLOBAL} ${rootrel;ext=.o:SRCS_GLOBAL} - -_LD_LINK_FAT_SUFFIX1=$_LD_ARCH_FLAG \ - -Ya,input $AUTO_INPUT $VCS_C_OBJ \ - -Ya,global_srcs - -_LD_LINK_FAT_SUFFIX2=-Ya,peers $PEERS \ - -Ya,linker $CXX_COMPILER \ - $LDFLAGS_GLOBAL $C_FLAGS_PLATFORM $LD_SDK_VERSION \ - -Ya,archiver $_LD_ARCHIVER \ - $TOOLCHAIN_ENV ${kv;hide:"p LD"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} - -LINK_FAT_OBJECT=\ - $_LD_LINK_FAT_PREFIX \ - --obj=$TARGET --lib=${output:REALPRJNAME.a} \ - $_LD_LINK_FAT_SUFFIX1 \ - $_LD_LINK_FAT_SRCS_GLOBALS_WA \ - $_LD_LINK_FAT_SUFFIX2 - -LINK_RECURSIVE_LIBRARY=\ - $_LD_LINK_FAT_PREFIX \ - --lib=$TARGET --with-own-obj --with-global-srcs \ - $_LD_LINK_FAT_SUFFIX1 \ - $_LD_LINK_FAT_SRCS_GLOBALS_NO_WA \ - $_LD_LINK_FAT_SUFFIX2 - -LINK_FAT_OBJECT_LIBRARY=\ - $_LD_LINK_FAT_PREFIX \ - --lib=$TARGET $FAT_OBJECT_ARGS $FAT_OBJECT_OUTS \ - $_LD_LINK_FAT_SUFFIX1 \ - $_LD_LINK_FAT_SRCS_GLOBALS_NO_WA \ - $_LD_LINK_FAT_SUFFIX2 - -LIBRT=-lrt -MD5LIB=-lcrypt -LIBRESOLV= -when ($OS_LINUX || $OS_DARWIN || $OS_ANDROID) { - LIBRESOLV=-lresolv -} -PROFFLAG=-pg diff --git a/build/conf/linkers/msvc_linker.conf b/build/conf/linkers/msvc_linker.conf deleted file mode 100644 index 9f852b1ef4..0000000000 --- a/build/conf/linkers/msvc_linker.conf +++ /dev/null @@ -1,271 +0,0 @@ -_MSVC_ARCH= -when ($ARCH_I386 == "yes" || $ARCH_I686 == "yes") { - _MSVC_ARCH=x86 -} -elsewhen ($ARCH_X86_64 == "yes") { - _MSVC_ARCH=x64 -} -elsewhen ($ARCH_ARM == "yes") { - _MSVC_ARCH=arm -} - -_FLAGS_MACHINE=/MACHINE:${toupper:_MSVC_ARCH} - -_FLAGS_IGNORE=/IGNORE:4221 - -_FLAGS_COMMON_IDE_MSVS= -when ($IDE_MSVS == "yes") { - _FLAGS_COMMON_IDE_MSVS=/INCREMENTAL -} -otherwise { - _FLAGS_COMMON_IDE_MSVS=/INCREMENTAL:NO -} - -# TODO(nslus): DEVTOOLS-1868 remove restriction. -_FLAGS_DEBUG_ONLY_DEBUG= -_FLAGS_RELEASE_ONLY_DEBUG= -_FLAGS_COMMON_DEBUG= -when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") { - when ($IDE_MSVS == "yes") { - when ($CLANG_CL == "yes") { - _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG - } - otherwise { - _FLAGS_DEBUG_ONLY_DEBUG=/DEBUG:FASTLINK - } - _FLAGS_RELEASE_ONLY_DEBUG=/DEBUG - } - otherwise { - _FLAGS_COMMON_DEBUG=/DEBUG - } -} - -_FLAGS_COMMON_LIBPATHS= -when ($IDE_MSVS != "yes") { - _FLAGS_COMMON_LIBPATHS=\ - /LIBPATH:"$_MSVC_TC_KIT_LIBS/um/$_MSVC_ARCH" \ - /LIBPATH:"$_MSVC_TC_KIT_LIBS/ucrt/$_MSVC_ARCH" \ - /LIBPATH:"$_MSVC_TC_VC_ROOT/lib/$_MSVC_ARCH" -} - -_FLAGS_COMMON =/NOLOGO /ERRORREPORT:PROMPT /SUBSYSTEM:CONSOLE /TLBID:1 $MSVC_DYNAMICBASE /NXCOMPAT -_FLAGS_COMMON+=$_FLAGS_IGNORE -_FLAGS_COMMON+=$_FLAGS_MACHINE -_FLAGS_COMMON+=$_FLAGS_COMMON_IDE_MSVS -_FLAGS_COMMON+=$_FLAGS_COMMON_DEBUG -_FLAGS_COMMON+=$_FLAGS_COMMON_LIBPATHS - -_FLAGS_DEBUG_ONLY_CLANG_CL= -when ($CLANG_CL == "yes") { - _FLAGS_DEBUG_ONLY_CLANG_CL=/STACK:4194304 -} - -_FLAGS_DEBUG_ONLY =$_FLAGS_DEBUG_ONLY_CLANG_CL -_FLAGS_DEBUG_ONLY+=$_FLAGS_DEBUG_ONLY_DEBUG -_FLAGS_RELEASE_ONLY =$_FLAGS_RELEASE_ONLY_DEBUG - -LINK_EXE_FLAGS_DEBUG =$_FLAGS_COMMON -LINK_EXE_FLAGS_DEBUG+=$_FLAGS_DEBUG_ONLY - -LINK_EXE_FLAGS_RELEASE =$_FLAGS_COMMON -LINK_EXE_FLAGS_RELEASE+=$_FLAGS_RELEASE_ONLY - -LINK_LIB_FLAGS=$_FLAGS_IGNORE $_FLAGS_MACHINE - -LINK_STDLIBS=\ - advapi32.lib \ - comdlg32.lib \ - crypt32.lib \ - dnsapi.lib \ - gdi32.lib \ - iphlpapi.lib \ - kernel32.lib \ - mswsock.lib \ - ole32.lib \ - oleaut32.lib \ - psapi.lib \ - rpcrt4.lib \ - secur32.lib \ - shell32.lib \ - shlwapi.lib \ - user32.lib \ - userenv.lib \ - uuid.lib \ - version.lib \ - winmm.lib \ - winspool.lib \ - ws2_32.lib - -LDFLAGS_GLOBAL= -LDFLAGS= -OBJADDE= - -LINK_EXE_FLAGS=$LINK_EXE_FLAGS_PER_TYPE - -LINK_IMPLIB=/IMPLIB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.lib} -_LINK_EXTRA_OUTPUT= -when (!$NO_DEBUGINFO || $NO_DEBUGINFO == "no" || $NO_DEBUGINFO == "0") { - _LINK_EXTRA_OUTPUT=/PDB:${output;noext;rootrel;pre=$MODULE_PREFIX:REALPRJNAME.pdb} -} -LINK_EXTRA_OUTPUT=$_LINK_EXTRA_OUTPUT - -LIB_WRAPPER=${FIX_MSVC_OUTPUT} lib -LINK_WRAPPER=${FIX_MSVC_OUTPUT} link -when ($_UNDER_WINE == "yes") { - LIB_WRAPPER= - LINK_WRAPPER= -} - -LINK_WRAPPER_DYNLIB=${YMAKE_PYTHON} ${input:"build/scripts/link_dyn_lib.py"} --arch WINDOWS --target $TARGET - -EXPORTS_VALUE= -LINK_IMPLIB_VALUE= -when ($EXPORTS_FILE) { - LINK_IMPLIB_VALUE=$LINK_IMPLIB - EXPORTS_VALUE=/DEF:${input:EXPORTS_FILE} -} - -GENERATE_MF_CMD=\ - $YMAKE_PYTHON ${input:"build/scripts/generate_mf.py"} ${input;hide:"build/scripts/process_command_files.py"} \ - --build-root $ARCADIA_BUILD_ROOT \ - --module-name $REALPRJNAME \ - -o ${output;rootrel;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.mf:REALPRJNAME} \ - -t $MODULE_TYPE \ - --ya-start-command-file \ - -Ya,lics $LICENSE_NAMES \ - -Ya,peers ${rootrel:PEERS} \ - -Ya,credits ${input:CREDITS_TEXTS_FILE} $CREDITS_FLAGS \ - --ya-end-command-file - -# we split srcs_global into two groups: libs and objs -# # each group can be in its own command file -# first group need /WHOLEARCHIVE: prefix which will be added in fix_msvc_output.py or run_msvc_wine.py -# the tail of link commands will be added in the third command file -_MSVC_SRCS_GLOBALS=\ ---start-wa --ya-start-command-file ${qe;rootrel;ext=.lib:SRCS_GLOBAL} --ya-end-command-file --end-wa \ ---ya-start-command-file ${qe;rootrel;ext=.obj:SRCS_GLOBAL} --ya-end-command-file - -REAL_LINK_DYN_LIB_CMDLINE=\ - ${TOOLCHAIN_ENV} \ - ${cwd:ARCADIA_BUILD_ROOT} \ - ${LINK_WRAPPER} \ - ${LINK_WRAPPER_DYNLIB} \ - ${LINK_EXE_CMD} \ - ${LINK_IMPLIB_VALUE} \ - /DLL \ - /OUT:${qe;rootrel:TARGET} \ - ${LINK_EXTRA_OUTPUT} \ - ${EXPORTS_VALUE} \ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - $_MSVC_SRCS_GLOBALS \ - --ya-start-command-file \ - ${VCS_C_OBJ_RR} \ - ${qe;rootrel:AUTO_INPUT} \ - ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \ - $LINK_EXE_FLAGS \ - $LINK_STDLIBS $LDFLAGS \ - $LDFLAGS_GLOBAL \ - $OBJADDE \ - --ya-end-command-file - -REAL_LINK_DYN_LIB=$REAL_LINK_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) - -SWIG_DLL_JAR_CMD=$GENERATE_MF && $GENERATE_VCS_C_INFO_NODEP && $REAL_SWIG_DLL_JAR_CMD - -_MSVC_HEAD_LINK_LIB=${TOOLCHAIN_ENV} ${cwd:ARCADIA_BUILD_ROOT} ${LIB_WRAPPER} ${LINK_LIB_CMD} -_MSVC_TAIL_LINK_LIB=\ - --ya-start-command-file \ - ${qe;rootrel:AUTO_INPUT} \ - $LINK_LIB_FLAGS \ - --ya-end-command-file \ - ${hide;kv:"soe"} ${hide;kv:"p AR"} ${hide;kv:"pc light-red"} - -LINK_LIB=${GENERATE_MF} && $_MSVC_HEAD_LINK_LIB /OUT:${qe;rootrel:TARGET} $_MSVC_TAIL_LINK_LIB -GLOBAL_LINK_LIB=$_MSVC_HEAD_LINK_LIB /OUT:${qe;rootrel:GLOBAL_TARGET} $_MSVC_TAIL_LINK_LIB - -LINK_EXE_CMDLINE=\ - ${GENERATE_MF} && \ - $GENERATE_VCS_C_INFO_NODEP && \ - ${TOOLCHAIN_ENV} \ - ${cwd:ARCADIA_BUILD_ROOT} \ - ${LINK_WRAPPER} \ - ${LINK_EXE_CMD} \ - /OUT:${qe;rootrel:TARGET} \ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - ${LINK_EXTRA_OUTPUT} \ - $_MSVC_SRCS_GLOBALS \ - --ya-start-command-file \ - ${VCS_C_OBJ_RR} \ - ${qe;rootrel:AUTO_INPUT} \ - $LINK_EXE_FLAGS \ - $LINK_STDLIBS \ - $LDFLAGS \ - $LDFLAGS_GLOBAL \ - $OBJADDE \ - ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \ - --ya-end-command-file \ - ${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"} - -LINK_EXE=$LINK_EXE_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) - -LINK_DYN_LIB=${GENERATE_MF} && $GENERATE_VCS_C_INFO_NODEP && $REAL_LINK_DYN_LIB ${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"} - -LINK_EXEC_DYN_LIB_CMDLINE=\ - ${GENERATE_MF} && \ - $GENERATE_VCS_C_INFO_NODEP && \ - ${TOOLCHAIN_ENV} \ - ${cwd:ARCADIA_BUILD_ROOT} \ - ${LINK_WRAPPER} \ - ${LINK_WRAPPER_DYNLIB} \ - ${LINK_EXE_CMD} \ - /OUT:${qe;rootrel:TARGET} \ - ${LINK_EXTRA_OUTPUT} \ - ${EXPORTS_VALUE} \ - ${pre=--whole-archive-peers :WHOLE_ARCHIVE_PEERS} \ - ${pre=--whole-archive-libs :_WHOLE_ARCHIVE_LIBS_VALUE_GLOBAL} \ - $_MSVC_SRCS_GLOBALS \ - '--ya-start-command-file \ - ${VCS_C_OBJ_RR} \ - ${qe;rootrel:AUTO_INPUT} \ - ${qe;rootrel;ext=.lib:PEERS} ${qe;rootrel;ext=.dll;noext;suf=.lib:PEERS} \ - $LINK_EXE_FLAGS \ - $LINK_STDLIBS \ - $LDFLAGS $LDFLAGS_GLOBAL \ - $OBJADDE \ - --ya-end-command-file \ - ${hide;kv:"soe"} ${hide;kv:"p LD"} ${hide;kv:"pc blue"} - -LINK_EXEC_DYN_LIB=$LINK_EXEC_DYN_LIB_IMPL($_WHOLE_ARCHIVE_PEERS_VALUE) - -LINK_GLOBAL_FAT_OBJECT=\ - ${TOOLCHAIN_ENV} \ - ${cwd:ARCADIA_BUILD_ROOT} \ - ${LIB_WRAPPER} \ - ${LINK_LIB_CMD} \ - /OUT:${qe;rootrel:TARGET} \ - --ya-start-command-file \ - ${qe;rootrel;ext=.lib:SRCS_GLOBAL} \ - ${qe;rootrel;ext=.obj:SRCS_GLOBAL} \ - ${qe;rootrel:AUTO_INPUT} \ - $LINK_LIB_FLAGS \ - --ya-end-command-file - -LINK_PEERS_FAT_OBJECT=\ - ${TOOLCHAIN_ENV} \ - ${cwd:ARCADIA_BUILD_ROOT} \ - ${LIB_WRAPPER} \ - ${LINK_LIB_CMD} \ - /OUT:${qe;rootrel;output:REALPRJNAME.lib} \ - --ya-start-command-file \ - ${qe;rootrel:PEERS} \ - $LINK_LIB_FLAGS \ - --ya-end-command-file - -LINK_FAT_OBJECT=\ - ${GENERATE_MF} && \ - $GENERATE_VCS_C_INFO_NODEP && \ - $LINK_GLOBAL_FAT_OBJECT && \ - $LINK_PEERS_FAT_OBJECT \ - ${kv;hide:"p LD"} ${kv;hide:"pc light-blue"} ${kv;hide:"show_out"} diff --git a/build/conf/opensource.conf b/build/conf/opensource.conf deleted file mode 100644 index 83c23d1421..0000000000 --- a/build/conf/opensource.conf +++ /dev/null @@ -1,54 +0,0 @@ -EXPORT_CMAKE=no
-
-when ($CATBOOST_OPENSOURCE == "yes") {
- OPENSOURCE=yes
- CFLAGS+=-DCATBOOST_OPENSOURCE=yes
- CXXFLAGS+=-DCATBOOST_OPENSOURCE=yes
-}
-
-when ($OPENSOURCE) {
- LOCAL_YDB_DOCKER_PUBLIC_BUILD=yes
- CATBOOST_OPENSOURCE=yes
- USE_DYNAMIC_IDN=yes
- USE_DYNAMIC_AIO=yes
- USE_DYNAMIC_ICONV=yes
- USE_ASMLIB=no
- SO_OUTPUTS=yes
- UDF_NO_PROBE=yes
- HAVE_MKL=no
- USE_MKL=no
-}
-
-# Extra macros to control how cmake export works
-
-CMAKE_PACKAGE=
-CMAKE_PACKAGE_COMPONENT=
-CMAKE_PACKAGE_TARGET=
-CONAN_REFERENCE=
-CONAN_PKG_OPTS=
-### @usage: OPENSOURCE_EXPORT_REPLACEMENT(CMAKE PkgName CMAKE_TARGET PkgName::PkgTarget CONAN ConanRef CMAKE_COMPONENT OptCmakePkgComponent)
-###
-### Use specified conan/system pacakcge when exporting cmake build scripts for arcadia C++ project
-### for opensource publication.
-macro OPENSOURCE_EXPORT_REPLACEMENT(CMAKE[], CMAKE_TARGET[], CMAKE_COMPONENET[], CONAN[], CONAN_OPTIONS[]) {
- SET(CMAKE_PACKAGE $CMAKE)
- SET(CMAKE_PACKAGE_COMPONENT $CMAKE_COMPONENET)
- SET(CMAKE_LINK_TARGET $CMAKE_TARGET)
- SET(CONAN_REFERENCE $CONAN)
- SET(CONAN_PKG_OPTS $CONAN_OPTIONS)
-}
-
-CMAKE_TARGET_NAME=$REALPRJNAME
-CMAKE_TARGET_ARTEFACT_RENAME_RULES=
-### @usage CMAKE_EXPORTED_TARGET_NAME(Name)
-###
-### Forces to use the name given as cmake target name without changing the name of output artefact.
-### This macro should be used to resolve target name conflicts in exported cmake project when
-### changing module name is not applicable. For example both CUDA and non-CUDA py modules for
-### catboost should have same name lib_catboost.so and both of them are defined as PY_ANY_MODULE(_catboost).
-### adding CMAKE_EXPORTED_TARGET_NAME(_catboost_non_cuda) to the non CUDA module ya.make file
-### changes exported cmake target name but preserve generated artefact file name.
-macro CMAKE_EXPORTED_TARGET_NAME(Name) {
- SET(CMAKE_TARGET_NAME $Name)
- SET(CMAKE_TARGET_ARTEFACT_RENAME_RULES && set_target_property OUTPUT_NAME $REALPRJNAME)
-}
diff --git a/build/conf/project_specific/maps/aar.conf b/build/conf/project_specific/maps/aar.conf deleted file mode 100644 index 780ff38984..0000000000 --- a/build/conf/project_specific/maps/aar.conf +++ /dev/null @@ -1,350 +0,0 @@ - -_GRADLE_FLAGS_VALUE= -### @usage: GRADLE_FLAGS(flags...) # internal -### -### SEt additional flags for gradle -macro GRADLE_FLAGS(FLAGS...) { - SET_APPEND(_GRADLE_FLAGS_VALUE $FLAGS) -} - -### @usage: PROGURAD_RULES(ProguardRuleFiles...) -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro PROGUARD_RULES(RULES...) { - SET_APPEND(_PROGUARD_RULES_GLOBAL $RULES) -} - -### @usage: AARS(Aars...) -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro AARS(DEPS...) { - SET_APPEND(_AARS_GLOBAL $DEPS) -} - -### @usage: MOBILE_DLL() # internal -module MOBILE_DLL: DLL { - .CMD=LINK_MOBILE_DLL - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) - PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(BIN_AAR_DIR $BINDIR/aar) - SET(BIN_TMP_DIR $BINDIR/tmp) -} - -_MOBILE_TEST_APK_AAR_MANIFEST_VALUE= -### @usage: MOBILE_TEST_APK_AAR_MANIFEST(file) # internal -macro MOBILE_TEST_APK_AAR_MANIFEST(FILE) { - SET(_MOBILE_TEST_APK_AAR_MANIFEST_VALUE $FILE) -} - -_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE= -### @usage: MOBILE_TEST_APK_AAR_PROGUARD_RULES(file) # internal -macro MOBILE_TEST_APK_AAR_PROGUARD_RULES(FILE) { - SET(_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE $FILE) -} - -_MOBILE_TEST_APK_AAR_AARS_VALUE= -### @usage: MOBILE_TEST_APK_AAR_AARS(filenames...) # internal -macro MOBILE_TEST_APK_AAR_AARS(AARS...) { - SET_APPEND(_MOBILE_TEST_APK_AAR_AARS_VALUE $AARS) -} - -_MOBILE_TEST_APK_AAR_BUNDLES_VALUE= -### @usage: MOBILE_TEST_APK_AAR_BUNDLES(filenames...) # internal -macro MOBILE_TEST_APK_AAR_BUNDLES(BUNDLES...) { - SET_APPEND(_MOBILE_TEST_APK_AAR_BUNDLES_VALUE $BUNDLES) - BUNDLE_EXTRA_INPUTS($BUNDLES) -} - -_MOBILE_TEST_APK_TEMPLATE_DIR= -### @usage: MOBILE_TEST_APK_TEMPLATE(dir filenames...) # internal -macro MOBILE_TEST_APK_TEMPLATE(TEMPLATE_DIR, INPUTS...) { - SET(_MOBILE_TEST_APK_TEMPLATE_DIR $TEMPLATE_DIR) - BUNDLE_EXTRA_INPUTS(${pre=$TEMPLATE_DIR/:INPUTS}) -} - -_MOBILE_TEST_APK_CMDLINE=\ -$FS_TOOLS md $BIN_TMP_DIR \ -&& $FS_TOOLS md $BINDIR/.android \ -&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ -&& $FS_TOOLS md $BINDIR/jni_libs/$ARCH_NAME \ -&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ -&& $MOVE_FILE $OUTPUT $BINDIR/jni_libs/$ARCH_NAME/${pre=lib;suf=.so:_MOBILE_TEST_APK_LIBRARY_NAME} \ -&& $FS_TOOLS md $BIN_AAR_DIR \ -&& $YMAKE_PYTHON ${input:"build/scripts/gen_aar_gradle_script.py"} \ -${input;hide:EXTRA_INPUTS} \ ---aidl-dirs $BIN_TMP_DIR/aidl \ ---assets-dirs $BIN_TMP_DIR/assets \ ---java-dirs $BIN_TMP_DIR/src \ ---jni-libs-dirs $BINDIR/jni_libs \ ---res-dirs $BIN_TMP_DIR/res \ ---manifest ${input:_MOBILE_TEST_APK_AAR_MANIFEST_VALUE} \ ---proguard-rules ${input:_MOBILE_TEST_APK_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ ---aars $_MOBILE_TEST_APK_AAR_AARS_VALUE $_AARS_GLOBAL \ ---bundles $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ ---output-dir $BIN_AAR_DIR \ ---bundle-name unittest \ ---maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ -&& ${cwd:BIN_AAR_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assemble${_BUNDLE_BUILD_TYPE} ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \ -&& $FS_TOOLS md $BIN_APK_DIR \ -&& $FS_TOOLS md $BIN_APK_DIR/res \ -&& $COPY_CMD $_MOBILE_TEST_APK_TEMPLATE_DIR/Manifest.xml $BIN_APK_DIR/Manifest.xml \ -&& $YMAKE_PYTHON ${input:"build/scripts/gen_test_apk_gradle_script.py"} \ -${input;hide:EXTRA_INPUTS} \ ---app-id $REALPRJNAME \ ---assets-dirs $_MOBILE_TEST_APK_ASSETS_DIRS_VALUE \ ---java-dirs $_MOBILE_TEST_APK_TEMPLATE_DIR/java \ ---jni-libs-dirs \ ---res-dirs $BIN_APK_DIR/res $_MOBILE_TEST_APK_TEMPLATE_DIR/res $BIN_TMP_DIR/res \ ---manifest Manifest.xml \ ---aars \ ---output-dir $BIN_APK_DIR \ ---bundle-name $REALPRJNAME \ ---bundles $BIN_AAR_DIR/build/outputs/aar/unittest-${tolower:_BUNDLE_BUILD_TYPE}.aar $_MOBILE_TEST_APK_AAR_BUNDLES_VALUE \ ---library-name $_MOBILE_TEST_APK_LIBRARY_NAME \ ---maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ -&& ${cwd:BIN_APK_DIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR assembleDebug ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \ -&& $COPY_CMD $BIN_APK_DIR/build/outputs/apk/${tolower:_BUNDLE_BUILD_TYPE}/$REALPRJNAME.apk ${OUTPUT} - -_MOBILE_TEST_APK_EXTRA_INPUTS_VALUE= - -macro _MOBILE_TEST_APK_CMD_IMPL(OUTPUT, EXTRA_INPUTS...) { - .CMD=$_MOBILE_TEST_APK_CMDLINE -} - -_MOBILE_TEST_APK_CMD=$_MOBILE_TEST_APK_CMD_IMPL($TARGET $_BUNDLE_EXTRA_INPUTS_VALUE) - -LINK_MOBILE_TEST_APK=$LINK_DYN_LIB && $_MOBILE_TEST_APK_CMD - -### @usage: MOBILE_TEST_APK() # internal -module MOBILE_TEST_APK: DLL { - .CMD=LINK_MOBILE_TEST_APK - .GLOBAL=_AARS _PROGUARD_RULES - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) - PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(MODULE_PREFIX) - SET(MODULE_SUFFIX .apk) - - SET(BIN_AAR_DIR $BINDIR/aar) - SET(BIN_APK_DIR $BINDIR/apk) - SET(BIN_TMP_DIR $BINDIR/tmp) - SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) - - SET(_MOBILE_TEST_APK_LIBRARY_NAME unittests) - - when ($OS_ANDROID == "yes") { - when ($ARCH_ARM7 == "yes") { - ARCH_NAME=armeabi-v7a - } - elsewhen ($ARCH_ARM64 == "yes") { - ARCH_NAME=arm64-v8a - } - elsewhen ($ARCH_I386 == "yes") { - ARCH_NAME=x86 - } - elsewhen ($ARCH_X86_64 == "yes") { - ARCH_NAME=x86_64 - } - otherwise { - ARCH_NAME=unsupported - } - } -} - - -### @usage: MOBILE_BOOST_TEST_APK() # internal -module MOBILE_BOOST_TEST_APK: MOBILE_TEST_APK { - PEERDIR(devtools/dummy_arcadia/test/test_apk/template) - PEERDIR(build/external_resources/mapsmobi_maven_repo) - ADD_YTEST($MODULE_PREFIX$REALPRJNAME boost.test) - - MOBILE_TEST_APK_TEMPLATE(${ARCADIA_ROOT}/devtools/dummy_arcadia/test/test_apk/template Manifest.xml java/com/yandex/test/unittests/RunTestsActivity.java res/values/strings.xml) -} - -when ($BT_RELEASE) { - _BUNDLE_BUILD_TYPE=Release -} -otherwise { - _BUNDLE_BUILD_TYPE=Debug -} - -_AAR_EXTRA_INPUTS_VALUE= - -_AAR_MANIFEST_VALUE= -### @usage: AAR_MANIFEST(filename) # internal -macro AAR_MANIFEST(FILE) { - SET(_AAR_MANIFEST_VALUE $FILE) -} - -_AAR_PROGUARD_RULES_VALUE= -### @usage: AAR_PROGUARD_RULES(filename) # internal -macro AAR_PROGUARD_RULES(FILE) { - SET(_AAR_PROGUARD_RULES_VALUE $FILE) -} - -_AAR_AARS_VALUE= -### @usage: AAR_AARS(aars...) # internal -macro AAR_AARS(Aars...) { - SET_APPEND(_AAR_AARS_VALUE $Aars) -} - -_AAR_COMPILE_ONLY_AARS_VALUE= -### @usage: AAR_COMPILE_ONLY_AARS(compile_only_aars...) # internal -macro AAR_COMPILE_ONLY_AARS(Aars...) { - SET_APPEND(_AAR_COMPILE_ONLY_AARS_VALUE $Aars) -} - - -_AAR_AIDL_DIRS_VALUE= -### @usage: AAR_AIDL_SRCS(dir filenames...) # internal -macro AAR_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_AIDL_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_ASSETS_DIRS_VALUE= -### @usage: AAR_ASSETS_SRCS(dir filenames...) # internal -macro AAR_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_ASSETS_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_BUNDLES_VALUE= -### @usage: AAR_BUNDLES(filenames...) # internal -macro AAR_BUNDLES(BUNDLES...) { - SET_APPEND(_AAR_BUNDLES_VALUE $BUNDLES) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE $BUNDLES) -} - -_AAR_JNI_LIB_DIRS_VALUE= -### @usage: AAR_JNI_LIBS(dir filenames...) # internal -macro AAR_JNI_LIBS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_JNI_LIB_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_JAVA_DIRS_VALUE= -### @usage: AAR_JAVA_SRCS(dir filenames...) # internal -macro AAR_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_JAVA_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_RES_DIRS_VALUE= -### @usage: AAR_RES_SRCS(dir filenames...) # internal -macro AAR_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_AAR_RES_DIRS_VALUE $PREFIX) - SET_APPEND(_AAR_EXTRA_INPUTS_VALUE ${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_AAR_LOCAL_MAVEN_REPO_VALUE= -### @usage: AAR_LOCAL_MAVEN_REPO(repo...) -macro AAR_LOCAL_MAVEN_REPO(REPO...) { - SET_APPEND(_AAR_LOCAL_MAVEN_REPO_VALUE $REPO) -} - -_AAR_GRADLE_SCRIPT_GENERATOR_VALUE= -### @usage: AAR_GRADLE_SCRIPT_GENERATOR(python_script) -macro AAR_GRADLE_SCRIPT_GENERATOR(GENERATOR) { - SET(_AAR_GRADLE_SCRIPT_GENERATOR_VALUE $GENERATOR) -} - -when ($AAR_GENERATE_DOC) { - _AAR_GENERATE_DOC_VALUE=--generate-doc - _AAR_COPY_DOC_VALUE=\ - && ${cwd:BINDIR} $COPY_CMD build/${REALPRJNAME}-javadoc.tar.gz ${output;suf=-javadoc.tar.gz:REALPRJNAME} -} -otherwise { - _AAR_GENERATE_DOC_VALUE= - _AAR_COPY_DOC_VALUE= -} - -when ($AAR_NO_STRIP) { - _AAR_NO_STRIP_VALUE=--do-not-strip -} -otherwise { - _AAR_NO_STRIP_VALUE= -} - -_AAR_CMDLINE=\ -$FS_TOOLS md $BIN_TMP_DIR \ -&& $FS_TOOLS md $BINDIR/.android \ -&& $COPY_CMD $GRADLE_DEBUG_STORE_RESOURCE_GLOBAL/debug.keystore $BINDIR/.android/debug.keystore \ -&& $YMAKE_PYTHON ${input:"build/scripts/extract_asrc.py"} --output $BIN_TMP_DIR --input ${suf=.asrc:PEERS} \ -&& $YMAKE_PYTHON ${input:_AAR_GRADLE_SCRIPT_GENERATOR_VALUE} \ -${input;hide:EXTRA_INPUTS} \ ---aidl-dirs $_AAR_AIDL_DIRS_VALUE $BIN_TMP_DIR/aidl \ ---assets-dirs $_AAR_ASSETS_DIRS_VALUE $BIN_TMP_DIR/assets \ ---java-dirs $_AAR_JAVA_DIRS_VALUE $BIN_TMP_DIR/src \ ---jni-libs-dirs $_AAR_JNI_LIB_DIRS_VALUE $BIN_TMP_DIR/jni_libs \ ---res-dirs $_AAR_RES_DIRS_VALUE $BIN_TMP_DIR/res \ ---manifest ${input:_AAR_MANIFEST_VALUE} \ ---proguard-rules ${input:_AAR_PROGUARD_RULES_VALUE} ${input:_PROGUARD_RULES_GLOBAL} \ ---aars $_AAR_AARS_VALUE $_AARS_GLOBAL \ ---compile-only-aars $_AAR_COMPILE_ONLY_AARS_VALUE \ ---bundles $_AAR_BUNDLES_VALUE \ ---output-dir $BINDIR \ ---bundle-name $REALPRJNAME \ ---peers $PEERS \ ---maven-repos $_AAR_LOCAL_MAVEN_REPO_VALUE \ -$_AAR_GENERATE_DOC_VALUE \ -$_AAR_NO_STRIP_VALUE \ -&& ${cwd:BINDIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR bundle${_BUNDLE_BUILD_TYPE}Aar ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE"} ${env:"ANDROID_SDK_HOME=$BINDIR"} $VCS_INFO_DISABLE_CACHE__NO_UID__ \ -&& ${cwd:BINDIR} $COPY_CMD build/outputs/aar/${REALPRJNAME}-${tolower:_BUNDLE_BUILD_TYPE}.aar $TARGET \ -$_AAR_COPY_DOC_VALUE \ -&& ${cwd:BINDIR} $COPY_CMD build/${suf=-pom.xml:REALPRJNAME} ${output;suf=-pom.xml:REALPRJNAME} \ -&& ${cwd:BINDIR} $COPY_CMD build/libs/${suf=-sources.jar:REALPRJNAME} ${output;suf=-sources.jar:REALPRJNAME} - -macro _AAR_CMD_IMPL(EXTRA_INPUTS...) { - .CMD=$_AAR_CMDLINE && $GENERATE_MF -} - -AAR_CMD=$_AAR_CMD_IMPL($_AAR_EXTRA_INPUTS_VALUE) - -### @usage: AAR() # internal -module AAR: _BASE_UNIT { - .CMD=AAR_CMD - .GLOBAL=_AARS _PROGUARD_RULES - .PEERDIR_POLICY=as_build_from - .FINAL_TARGET=yes - - SET(MODULE_PREFIX) - SET(MODULE_SUFFIX .aar) - SET(DONT_RESOLVE_INCLUDES yes) - SET(NEED_PLATFORM_PEERDIRS no) - NO_PLATFORM() - - PEERDIR(build/external_resources/android_sdk) - PEERDIR(build/external_resources/gradle) - PEERDIR(build/platform/java/jdk) - PEERDIR($JDK_RESOURCE_PEERDIR) - - SET(BIN_TMP_DIR $BINDIR/tmp) - SET(BIN_GRADLE_USER_HOME_DIR $BINDIR/gradle) -} - -_SECONDARY_OUTPUT_VALUE= - -### @usage: SECONDARY_OUTPUT(filename) # internal -### -### The use of this macro is strictly prohibited!!! -macro SECONDARY_OUTPUT(OUTPUT) { - SET(_SECONDARY_OUTPUT_VALUE $OUTPUT) -} - -_AAR_PROXY_LIBRARY_CMD=$LINK_LIB && $COPY_CMD $_SECONDARY_OUTPUT_VALUE ${input;hide:_SECONDARY_OUTPUT_VALUE} ${output:REALPRJNAME.aar} - -### @usage: AAR_PROXY_LIBRARY() # internal -### -### The use of this module is strictly prohibited!!! -module AAR_PROXY_LIBRARY: _PROXY_LIBRARY { - .ALLOWED=SECONDARY_OUTPUT - .CMD=_AAR_PROXY_LIBRARY_CMD -} diff --git a/build/conf/project_specific/maps/asrc.conf b/build/conf/project_specific/maps/asrc.conf deleted file mode 100644 index dee6354cbc..0000000000 --- a/build/conf/project_specific/maps/asrc.conf +++ /dev/null @@ -1,122 +0,0 @@ -_BUNDLE_DELIM_JAVA=__DELIM_JAVA__ -_BUNDLE_DELIM_RES=__DELIM_RES__ -_BUNDLE_DELIM_ASSETS=__DELIM_ASSETS__ -_BUNDLE_DELIM_AIDL=__DELIM_AIDL__ - -_BUNDLE_EXTRA_INPUTS_VALUE= -### @usage: BUNDLE_EXTRA_INPUTS(filenames...) # internal -macro BUNDLE_EXTRA_INPUTS(INPUTS...) { - SET_APPEND(_BUNDLE_EXTRA_INPUTS_VALUE $INPUTS) -} - -_BUNDLE_AIDL_SRCS_VALUE= -### @usage: BUNDLE_AIDL_SRCS(dirname filenames...) # internal -macro BUNDLE_AIDL_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_DELIM_AIDL $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_JAVA_SRCS_VALUE= -### @usage: BUNDLE_JAVA_SRCS(dirname filenames...) # internal -macro BUNDLE_JAVA_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_DELIM_JAVA $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_RES_SRCS_VALUE= -### @usage: BUNDLE_RES_SRCS(dirname filenames...) # internal -macro BUNDLE_RES_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_RES_SRCS_VALUE $_BUNDLE_DELIM_RES $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_ASSETS_SRCS_VALUE= -### @usage: BUNDLE_ASSETS_SRCS(dirname filenames...) # internal -macro BUNDLE_ASSETS_SRCS(PREFIX, ABSOLUTE[], FILES...) { - SET_APPEND(_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_DELIM_ASSETS $PREFIX ${pre=$PREFIX/:FILES} ${ABSOLUTE}) - BUNDLE_EXTRA_INPUTS(${pre=$PREFIX/:FILES} ${ABSOLUTE}) -} - -_BUNDLE_SRCS_VALUE=$_BUNDLE_AIDL_SRCS_VALUE $_BUNDLE_ASSETS_SRCS_VALUE $_BUNDLE_JAVA_SRCS_VALUE $_BUNDLE_RES_SRCS_VALUE - -macro _COMPILE_ASRC_IMPL(EXTRA_INPUTS...) { - .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output $TARGET ${kv;hide:"p AC"} $kv;hide:"pc light-blue"} ${kv;hide:"show_out"} -} - -_COMPILE_ASRC=$_COMPILE_ASRC_IMPL($_ASRC_EXTRA_INPUTS_VALUE) - -COMPILE_ASRC_MF=$_COMPILE_ASRC && $GENERATE_MF - -### @usage: ASRC_LIBRARY() # internal -module ASRC_LIBRARY: _BASE_UNIT { - .CMD=COMPILE_ASRC_MF - .ALL_INS_TO_OUT=no - .PEERDIR_POLICY=as_include - .FINAL_TARGET=no - PEERDIR_TAGS=JAVA_PROTO JAVA_IDL - MODULE_TYPE=Library - SET(MODULE_SUFFIX .asrc) - SET(DONT_RESOLVE_INCLUDES yes) - SET(NEED_PLATFORM_PEERDIRS no) - - NO_RUNTIME() -} - -macro _MOBILE_LIBRARY_PREREQUISITES_IMPL(OUTPUT, EXTRA_INPUTS...) { - .CMD=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --input $_BUNDLE_SRCS_VALUE --output $OUTPUT ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} -} - -macro _MOBILE_LIBRARY_PREREQUISITES_CMD(OUTPUT, EXTRA_INPUTS...) { - .CMD=${output;hide:OUTPUT} ${input;hide:EXTRA_INPUTS} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} $_MOBILE_LIBRARY_PREREQUISITES_IMPL($OUTPUT $EXTRA_INPUTS) -} - -when ($OS_ANDROID == "yes") { - LINK_MOBILE_LIB=$LINK_LIB && $_MOBILE_LIBRARY_PREREQUISITES_CMD(${BINDIR}/$MODULE_PREFIX$REALPRJNAME$MODULE_SUFFIX.asrc $_BUNDLE_EXTRA_INPUTS_VALUE) -} -otherwise { - LINK_MOBILE_LIB=$LINK_LIB -} - -### @usage: MOBILE_LIBRARY() # internal -module MOBILE_LIBRARY: LIBRARY { - .CMD=LINK_MOBILE_LIB - DISABLE(NEED_ADD_FAKE_SRC) -} - -_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --jsrcs ${ext=.jsrc;tags_in=local:PEERS} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} - -macro _JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL(EXTRA_INPUTS...) { - .CMD=$_JSRC_PROXY_MOBILE_LIBRARY_CMDLINE -} - -JSRC_PROXY_MOBILE_LIBRARY_CMD=$LINK_LIB && $_JSRC_PROXY_MOBILE_LIBRARY_CMD_IMPL($_BUNDLE_EXTRA_INPUTS_VALUE) - -### @usage: JSRC_PROXY_MOBILE_LIBRARY() # internal -module JSRC_PROXY_MOBILE_LIBRARY: MOBILE_LIBRARY { - .CMD=JSRC_PROXY_MOBILE_LIBRARY_CMD - .PEERDIR_POLICY=as_build_from - .PROXY=yes - - SET(MODULE_TYPE LIBRARY) - DISABLE(NEED_ADD_FAKE_SRC) - - PEERDIR_TAGS=JAVA_PROTO JAVA_IDL - - SET(BIN_TMP_DIR ${BINDIR}/tmp) - - NO_UTIL() -} - -_MOBILE_DLL_PREREQUISITES_CMDLINE=${cwd:ARCADIA_BUILD_ROOT} $YMAKE_PYTHON ${input:"build/scripts/link_asrc.py"} --work $BINDIR --asrcs ${PEERS.arcs} --input $_BUNDLE_SRCS_VALUE ${input;hide:EXTRA_INPUTS} --output ${output;pre=$MODULE_PREFIX;suf=$MODULE_SUFFIX.asrc:REALPRJNAME} ${kv;hide:"p AC"} ${kv;hide:"pc lite-blue"} ${kv;hide:"show_out"} - -macro _MOBILE_DLL_PREREQUISITES_CMD(EXTRA_INPUTS...) { - .CMD=$_MOBILE_DLL_PREREQUISITES_CMDLINE -} - -when ($OS_ANDROID == "yes") { - LINK_MOBILE_DLL=$LINK_DYN_LIB && $_MOBILE_DLL_PREREQUISITES_CMD($_BUNDLE_EXTRA_INPUTS_VALUE) -} -otherwise { - LINK_MOBILE_DLL=$LINK_DYN_LIB -} - diff --git a/build/conf/project_specific/maps/mapkit.conf b/build/conf/project_specific/maps/mapkit.conf deleted file mode 100644 index db64b3112c..0000000000 --- a/build/conf/project_specific/maps/mapkit.conf +++ /dev/null @@ -1,283 +0,0 @@ -MAPKIT_IDL_INCLUDES= -macro MAPKIT_ADDINCL(Dirs...) { - ADDINCL(${pre=FOR idl :Dirs}) - SET_APPEND(MAPKIT_IDL_INCLUDES $Dirs) -} - -### @usage: MAPS_IDL_ADDINCL(dirnames...) # internal -### -### Warpper for MAPKIT_ADDINCL macro which is used for mobile mapkit build -macro MAPS_IDL_ADDINCL(Dirs...) { - MAPKIT_ADDINCL($Dirs) -} - -### @usage: _MAPKITIDL_PROXY(args...) # internal -### -### Proxy macro for MAPKITIDL which adds PEERDIR to YMAKE resources -macro _MAPKITIDL_PROXY(Args...) { - MAPKITIDL($Args) - ENABLE(USE_YMAKE_RESOURCE) - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_TEXT_DEPS ${ext=idl:Args}) -} - -MAPS_IDL_FILTER= - -### @usage: MAPS_IDL_SRCS(filenames...) # internal -### -### Warpper for MAPKITIDL macro which is used for mobile mapkit build -macro MAPS_IDL_SRCS(Srcs...) { - _MAPKITIDL_PROXY($Srcs ${MAPS_IDL_FILTER}) -} - -### @usage: MAPS_IDL_GLOBAL_SRCS(filenames...) # internal -### -### Warpper for MAPKITIDL macro which is used for mobile mapkit build -macro MAPS_IDL_GLOBAL_SRCS(Srcs...) { - _MAPKITIDL_PROXY(GLOBAL_OUTPUTS $Srcs ${MAPS_IDL_FILTER}) -} - -### @usage: MAPSMOBI_SRCS(filenames...) # internal -### -### Make all source files listed as GLOBAL or not (depending on the value of -### MAPSMOBI_USE_SRCS_GLOBAL). Be careful since the value of -### MAPSMOBI_USE_SRCS_GLOBAL matters! If the value of this variable is equal to -### GLOBAL then call to MAPSMOBI_SRCS() macro behaves like call to -### GLOBAL_SRCS() macro otherwise the value of MAPSMOBI_USE_SRCS_GLOBAL is -### treated as a file name and a call to MAPSMOBI_SRCS() macro behaves like a -### call to SRCS() macro with additional argument which is the value of -### MAPSMOBI_USE_SRCS_GLOBAL variable -macro MAPSMOBI_SRCS(FILES...) { - ALL_SRCS(${MAPSMOBI_USE_SRCS_GLOBAL} $FILES) -} - -### @usage: EXPORT_MAPKIT_PROTO() # internal deprecated -### -### This macro is a temporary one and should be changed to EXPORT_YMAPS_PROTO -### when transition of mapsmobi to arcadia is finished -macro EXPORT_MAPKIT_PROTO() { - PROTO_NAMESPACE(GLOBAL maps/mapsmobi/external/proto) -} - -BEFORE_PEERS= -AFTER_PEERS= -when ($MAPKIT_WHOLE_ARCHIVE == "yes") { - when($OS_LINUX) { - BEFORE_PEERS += $START_WHOLE_ARCHIVE_VALUE - AFTER_PEERS += $END_WHOLE_ARCHIVE_VALUE - } - elsewhen($OS_DARWIN) { - LDFLAGS+=-Wl,-all_load - } -} - -### @usage: MAPKIT_ENABLE_WHOLE_ARCHIVE() # internal deprecated -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPKIT_ENABLE_WHOLE_ARCHIVE() { - ENABLE(MAPKIT_WHOLE_ARCHIVE) -} - -### @usage: MAPS_IDL_LIBRARY() -### -### Definition of multimodule that builds various variants of libraries. -### The particular variant is selected based on where PEERDIR to IDL_LIBRARY comes from. -### Now supported 2 variants: C++, Java -### Java version is not really a library but an archive of generated Java sources -multimodule MAPS_IDL_LIBRARY { - module CPP_IDL: LIBRARY { - .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_GLOBAL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS - SET(PEERDIR_TAGS CPP_IDL CPP_PROTO __EMPTY__) - SET(MAPS_IDL_FILTER) - ENABLE(CPP_IDL) - NO_UTIL() - - when ($OS_IOS == "yes") { - CFLAGS+=-fobjc-arc - } - } - - module JAVA_IDL: JSRC_LIBRARY { - .ALIASES=SRCS=MAPS_IDL_SRCS GLOBAL_SRCS=MAPS_IDL_SRCS ADDINCL=MAPKIT_ADDINCL MAPSMOBI_SRCS=MAPS_IDL_SRCS - .IGNORED=CPP_ADDINCL - SET(PEERDIR_TAGS JAVA_IDL JAVA_PROTO) - SET(MAPS_IDL_FILTER FILTER .java) - ENABLE(JAVA_IDL) - } -} - -### @usage: MAPSMOBI_COLLECT_ASSETS_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_ASSETS_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_AIDL_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_AIDL_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.aidl) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_JAVA_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_JAVA_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.java) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_JNI_LIBS_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_JNI_LIBS_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.so) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_RES_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_RES_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.(xml|png)) - RESTRICT_PATH(maps/mobile maps/automotive MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPSMOBI_COLLECT_TPL_FILES(varname [dir]) # internal -### -### This macro is strictly prohibited to use outside of mapsmobi project -macro MAPSMOBI_COLLECT_TPL_FILES(VAR, DIR="") { - _GLOB($VAR ${suf=/:DIR}**/*.tpl) - RESTRICT_PATH(tools/idl MSG This macro is for use in mapsmobi projects) -} - -### @usage: MAPS_GARDEN_COLLECT_MODULE_TRAITS(varnamei dir) # internal -### -### This macro is strictly prohibited to use outside of maps/garden project -macro MAPS_GARDEN_COLLECT_MODULE_TRAITS(VAR, DIR) { - _GLOB($VAR $DIR/*/module_traits.json) - RESTRICT_PATH(maps/garden/sdk/module_traits/tests/module_traits_bundle MSG This macro is for use in maps/garden project) -} - -# mapsmobi build configuration - -MAPSMOBI_FAKEID=${FAKEID}_r8609790 -MAPSMOBI_BUILD= -YANDEX_EXPORT= -YRT_EXPORT= -MAPSMOBI_CPP_PROTO_PLUGINS= -STATIC_STL= -EXPORT_ALL_SYMBOLS= -when ($MAPSMOBI_BUILD_HOST || $MAPSMOBI_BUILD_TARGET) { - MAPSMOBI_BUILD=yes -} -when ($MAPSMOBI_BUILD) { - CFLAGS+=-DMOBILE_BUILD ${hide:MAPSMOBI_FAKEID} - MAPKIT_BASE_PROTO_PACKAGE=yandex.maps.proto - MAPKIT_PROTO_ROOT=maps/doc/proto - MAPKIT_IDL_FRAMEWORK=maps/mobile/libs/idl_frameworks -} -when ($MAPSMOBI_BUILD_TARGET) { - ALLOCATOR=FAKE - USE_VANILLA_PROTOC=yes - PROTOBUF_LITE=yes - CPP_PROTO_PLUGINS=lite${pre=,:MAPSMOBI_CPP_PROTO_PLUGINS}: - when ($OPENSOURCE != "yes") { - SYSINCL+=build/yandex_specific/sysincl/mapsmobi.yml - } - - CFLAGS+=-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DBOOST_CB_DISABLE_DEBUG -DBOOST_COROUTINES_NO_DEPRECATION_WARNING -DYANDEX_EXPORT=${YANDEX_EXPORT} -DYRT_EXPORT=${YRT_EXPORT} -} -when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { - JDK_REAL_VERSION=8 - MAPSMOBI_CPP_PROTO_PLUGINS="dllexport_decl=YANDEX_EXPORT" - YANDEX_EXPORT=__attribute__((visibility(\"default\"))) - CFLAGS+=-fvisibility=hidden - - when ($MAPS_MOBILE_EXPORT_CPP_API) { - LDFLAGS+=-lc++_shared - CFLAGS+=-DZLIB_DLL - CFLAGS+=-DPROTOBUF_USE_DLLS -DLIBPROTOBUF_EXPORTS - CFLAGS+=-DPNG_IMPEXP=${YANDEX_EXPORT} - CFLAGS+=-DBOOST_ALL_DYN_LINK - CFLAGS+=-DBOOST_SYMBOL_EXPORT=${YANDEX_EXPORT} - DYNAMIC_BOOST=yes - } - otherwise { - STATIC_STL=yes - YANDEX_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= - LDFLAGS+=-lc++_static -Wl,--exclude-libs,ALL -static-libstdc++ - USE_GLOBAL_CMD=no - } - - when ($EXPORT_ALL_SYMBOLS) { - CFLAGS+=-fvisibility=default - } - - when ($NO_DEBUGINFO != "yes" && $REDUCED_DEBUGINFO) { - CFLAGS+=-g1 - } - - CFLAGS+=-DANDROID -fpic -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -Wa,--noexecstack - CFLAGS+=-Qunused-arguments -Wno-unused-function -Wno-pessimizing-move -Wno-missing-field-initializers -Wno-missing-braces -Wno-unused-parameter -Wno-vexing-parse -Wno-sign-compare -Wno-deprecated-declarations - - LDFLAGS+=-lc -lm -llog -Bsymbolic -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -Wl,--no-undefined - - when ($BT_RELEASE || $BT_RELWITHDEBINFO) { - CFLAGS+=-fomit-frame-pointer -fvisibility-inlines-hidden -ffunction-sections -fdata-sections - LDFLAGS+=-Wl,--gc-sections -Wl,--build-id - } - - when ($ARCH_ARM7) { - CFLAGS+=-mfloat-abi=softfp - #Android clang overaligns some float types which causes NEON programs to fail on old Android versions. So we disable NEON. - #See https://github.com/android/ndk/issues/640 for more information - CFLAGS+=-mfpu=vfpv3-d16 - } - elsewhen ($ARCH_ARM64) { - } - elsewhen ($ARCH_I386) { - CFLAGS+=-fstrict-aliasing -mstackrealign -DTLS_STACK_PROTECTOR - } - elsewhen ($ARCH_X86_64) { - CFLAGS+=-fstrict-aliasing -mstackrealign -march=x86-64 -msse4.2 -mpopcnt -m64 -DTLS_STACK_PROTECTOR - } - otherwise { - PEERDIR+=__unsupported_architecture_for_android__ - } -} -when ($MAPSMOBI_BUILD_TARGET && $OS_DARWIN) { - QT_REQUIRED=yes - LDFLAGS+=-lc++ - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} -when ($MAPSMOBI_BUILD_TARGET && $OS_IOS) { - CFLAGS+=-DIOS -stdlib=libc++ -fvisibility=hidden - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= - when ($MAPS_MOBILE_EXPORT_OBJC_API) { - YRT_EXPORT=__attribute__((visibility(\"default\"))) - } -} -when ($MAPSMOBI_BUILD_TARGET && $OS_LINUX) { - when ($NO_GRAPHICS != "yes") { - QT_REQUIRED=yes - OPENGL_REQUIRED=yes - } - OS_SDK=ubuntu-16 - PIC=yes - LDFLAGS+=-lstdc++ -lgcc_s - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} -when ($MAPSMOBI_BUILD_TARGET && $OS_YOCTO) { - QT_REQUIRED=yes - PIC=yes - CFLAGS+=-DBOOST_SYMBOL_EXPORT= - CFLAGS+=-DBOOST_SYMBOL_VISIBLE= -} diff --git a/build/conf/project_specific/maps/sproto.conf b/build/conf/project_specific/maps/sproto.conf deleted file mode 100644 index 1a62563fc1..0000000000 --- a/build/conf/project_specific/maps/sproto.conf +++ /dev/null @@ -1,21 +0,0 @@ -### @usage: EXPORT_YMAPS_PROTO() # maps-specific -### -### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace. -macro EXPORT_YMAPS_PROTO() { - PROTO_NAMESPACE(GLOBAL maps/doc/proto) -} - -macro _YMAPS_GENERATE_SPROTO_HEADER(File) { - .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"} - .PEERDIR=maps/libs/sproto -} - -### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific -### -### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc. -macro YMAPS_SPROTO(FILES...) { - SET(PROTO_HEADER_EXTS .pb.h .sproto.h) - foreach (FILE : $FILES) { - [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE) - } -} diff --git a/build/conf/project_specific/other.conf b/build/conf/project_specific/other.conf deleted file mode 100644 index 602ed5cfa3..0000000000 --- a/build/conf/project_specific/other.conf +++ /dev/null @@ -1,11 +0,0 @@ -# Catboost -BUILD_CATBOOST_SCRIPT=build/scripts/build_catboost.py -### @usage: BUILD_CATBOOST(cbmodel cbname) -### -### Generate catboost model and access code. -### cbmodel - CatBoost model file name (*.cmb). -### cbname - name for a variable (of NCatboostCalcer::TCatboostCalcer type) to be available in CPP code. -### CatBoost specific macro. -macro BUILD_CATBOOST(CbModel, CbName) { - .CMD=$YMAKE_PYTHON ${input:BUILD_CATBOOST_SCRIPT} build_cb_f $ARCADIA_ROOT $ARCH_TOOL ${input:CbModel} $CbName ${output;chksum;pre=cb.:CbName.cpp} ${output;hide;pre=CB_External_;suf=.rodata:CbName} ${output_include;hide:"kernel/catboost/catboost_calcer.h"} ${kv;hide:"p CB"} ${kv;hide:"pc yellow"} -} diff --git a/build/conf/project_specific/yql_udf.conf b/build/conf/project_specific/yql_udf.conf deleted file mode 100644 index 24eeb7f047..0000000000 --- a/build/conf/project_specific/yql_udf.conf +++ /dev/null @@ -1,266 +0,0 @@ -when ($SANITIZER_TYPE || $USE_ARCADIA_PYTHON == "no" || $UDF_NO_PROBE == "yes" || $MUSL == "yes" || $TIDY == "yes") { - YQL_UDF_LINK_CMD=$LINK_DYN_LIB - YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB -} -otherwise { - YQL_UDF_LINK_CMD=$LINK_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} - YQL_UDF_LINK_PRG_CMD=$LINK_EXEC_DYN_LIB && ${tool:"yql/tools/udf_probe"} $TARGET ${kv;hide:"p UD"} -} - -### @usage: UDF_BASE(name [EXPORTS symlist_file] [PREFIX prefix]) #internal -### -### The base logic of all UDF extension modules (User-Defined Functions). -### Processing EXPORTS and PREFIX is the same as for DLL. -### -### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc -module UDF_BASE: DLL_UNIT { - PRINT_MODULE_TYPE(UDF $REALPRJNAME) - - when ($MSVC != "yes" && $DARWIN != "yes") { - LDFLAGS+= -Wl,-Bsymbolic - } -} - -### @usage: UDF(name [EXPORTS symlist_file] [PREFIX prefix]) # deprecated -### -### The KiWi UDF module. -### Processing EXPORTS and PREFIX is the same as for DLL. -### -### https://wiki.yandex-team.ru/robot/manual/kiwi/userguide/#polzovatelskiefunkciiudftriggerykwcalc -module UDF: UDF_BASE { - PEERDIR(yweb/robot/kiwi/kwcalc/udflib) -} - -### @usage: UDF_LIB([name]) # deprecated -### -### The LIBRARY module for KiWi UDF, so has default PEERDIR to yweb/robot/kiwi/kwcalc/udflib. -module UDF_LIB: LIBRARY { - PEERDIR(yweb/robot/kiwi/kwcalc/udflib) -} - -UDF_NO_PROBE="no" -### @usage: UDF_NO_PROBE() -### -### Disable UDF import check at build stage -macro UDF_NO_PROBE() { - ENABLE(UDF_NO_PROBE) -} - -### @usage: YQL_UDF_TEST([name]) -### -### The module to test YQL C++ UDF. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/libraries/testing/ -### Documentation about the Arcadia test system: https://wiki.yandex-team.ru/yatool/test/ -module YQL_UDF_TEST: PY2TEST { - PEERDIR(yql/library/udf_test) - PEERDIR(yt/python/client_lite) - - DEPENDS(yql/tools/astdiff) - DEPENDS(yql/tools/udf_resolver) - DEPENDS(yql/tools/yqlrun) - DATA(arcadia/ydb/library/yql/mount) - DATA(arcadia/yql/cfg/tests) -} - -### @usage: _ADD_YQL_UDF_DEPS() -### -### Add all needed PEERDIRs to a YQL_UDF. -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -macro _ADD_YQL_UDF_DEPS() { - PEERDIR(ydb/library/yql/public/udf) - PEERDIR(ydb/library/yql/public/udf/support) -} - -### @usage: _MAKE_YQL_UDF() -### -### Make module definition an YQL UDF: add all needed dependencies, properties and flags -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -macro _MAKE_YQL_UDF() { - _ADD_YQL_UDF_DEPS() - SET_APPEND(USER_CXXFLAGS -DBUILD_UDF) - # For Windows using declspecs - DEFAULT(YQL_UDF_EXPORT ${ARCADIA_ROOT}/ydb/library/yql/public/udf/udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_UDF_EXPORT= - } - - SET(EXPORTS_FILE $YQL_UDF_EXPORT) -} - -### @usage: YQL_UDF_MODULE(name) -### -### The extension module for YQL with C++ UDF (User Defined Function YQL) -### -### https://yql.yandex-team.ru/docs/yt/udf/cpp/ -module YQL_UDF_MODULE: UDF_BASE { - .CMD=YQL_UDF_LINK_CMD - _MAKE_YQL_UDF() - PROVIDES(YqlServicePolicy) -} - -module _YQL_UDF_PROGRAM_BASE: SO_PROGRAM { - .CMD=YQL_UDF_LINK_PRG_CMD - _MAKE_YQL_UDF() -} - -UDF_SHARED_SEM=IGNORED - -### @usage: YQL_UDF(name) -### -### User-defined function for YQL -### -### Multimodule which is YQL_UDF_MODULE when built directly or referred by BUNDLE and DEPENDS macros. -### If used by PEERDIRs it is usual static LIBRARY with default YQL dependencies, allowing code reuse between UDFs. -### -### @see: [YQL_UDF_MODULE()](#module_YQL_UDF_MODULE) -multimodule YQL_UDF { - module YQL_UDF_SHARED: YQL_UDF_MODULE { - .SEM=UDF_SHARED_SEM - NO_CLANG_TIDY() - } - module YQL_UDF_STATIC: _DLL_COMPATIBLE_LIBRARY { - .ALIASES=SRCS=GLOBAL_SRCS - .SEM=CPP_LIBRARY_SEM - .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM - OBJ_SUF=.udfs - _ADD_YQL_UDF_DEPS() - # disable credits generation for static library - SET(CREDITS_FLAGS) - when ($MSVC == "yes" || $CYGWIN == "yes") { - MODULE_SUFFIX=.static.lib - } - } -} - -### @usage: YQL_ABI_VERSION(major minor release)) -### -### Specifying the supported ABI for YQL_UDF. -### -### @see: [YQL_UDF()](#multimodule_YQL_UDF) -macro YQL_ABI_VERSION(Major, Minor, Patch) { - YQL_ABI_FLAGS=-DUDF_ABI_VERSION_MAJOR=$Major -DUDF_ABI_VERSION_MINOR=$Minor -DUDF_ABI_VERSION_PATCH=$Patch - SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) -} - -### @usage: YQL_LAST_ABI_VERSION() -### -### Use the last ABI for YQL_UDF -### -macro YQL_LAST_ABI_VERSION() { - YQL_ABI_FLAGS=-DUSE_CURRENT_UDF_ABI_VERSION - SET_APPEND(USER_CXXFLAGS $YQL_ABI_FLAGS) -} - -### @usage: YQL_PYTHON_UDF(name) -### -### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON_UDF: YQL_UDF_MODULE { - .IGNORED=USE_PYTHON2 - .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL - - USE_PYTHON2() - _ARCADIA_PYTHON_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -### @usage: YQL_PYTHON_UDF_PROGRAM(name) -### -### Definition of the extension module for YQL with Python 2.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON_UDF_PROGRAM: _YQL_UDF_PROGRAM_BASE { - .IGNORED=USE_PYTHON2 - .RESTRICTED=PYTHON3_ADDINCL USE_PYTHON3 PYTHON2_ADDINCL - USE_PYTHON2() - _ARCADIA_PYTHON_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -### @usage: YQL_PYTHON3_UDF(name) -### -### The extension module for YQL with Python 3.x UDF (User Defined Function for YQL). -### Unlike YQL_UDF this is plain DLL module, so PEERDIRs to it are not allowed. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -module YQL_PYTHON3_UDF: YQL_UDF_MODULE { - .RESTRICTED=PYTHON2_ADDINCL PYTHON3_ADDINCL USE_PYTHON2 USE_PYTHON3 - _ARCADIA_PYTHON3_ADDINCL() - PEERDIR(build/platform/python/ldflags) - PEERDIR(library/python/type_info) - - DEFAULT(YQL_PYTHON_UDF_EXPORT ${ARCADIA_ROOT}/yql/udfs/common/python/python_udf/python_udfs_exports.exports) - - when ($WINDOWS == "yes") { - YQL_PYTHON_UDF_EXPORT= - } - - ### FIXME: XXX the statement below uncoditionally set EXPORTS_FILE (due to incorrect behaviour of old ConfReader - ###when ($USE_ARCADIA_PYTHON == "yes") SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) - SET(EXPORTS_FILE $YQL_PYTHON_UDF_EXPORT) -} - -macro _MAKE_YQL_PYTHON_UDF_TEST() { - PEERDIR(library/python/pytest) - DEPENDS(yql/tools/run_python_udf) - SETUP_PYTEST_BIN(RUNNER_BIN $(BUILD_ROOT)/yql/tools/run_python_udf/run_python_udf) -} - -### @usage: YQL_PYTHON_UDF_TEST(name) -### -### The Python test for Python YQL UDF (Python User Defined Function for YQL). The code should be a proper YQL_PYTHON_UDF. -### -### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -### -### @example: https://a.yandex-team.ru/arc/trunk/arcadia/yql/udfs/test/simple/ya.make -### -### @see: [YQL_PYTHON_UDF()](#module_YQL_PYTHON_UDF) -module YQL_PYTHON_UDF_TEST: YQL_PYTHON_UDF { - _MAKE_YQL_PYTHON_UDF_TEST() - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) -} - -### @usage: YQL_PYTHON3_UDF_TEST(name) -### -### The Python test for Python 3.x YQL UDF (User Defined Function for YQL). The code should be a proper YQL_PYTHON3_UDF. -### -### This module will basically build itself as UDF and run as test using yql/tools/run_python_udf/run_python_udf tool. -### -### Documentation: https://yql.yandex-team.ru/docs/yt/udf/python/ -### -### @see: [YQL_PYTHON3_UDF()](#module_YQL_PYTHON3_UDF) -module YQL_PYTHON3_UDF_TEST: YQL_PYTHON3_UDF { - _MAKE_YQL_PYTHON_UDF_TEST() - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) -} diff --git a/build/conf/rules.conf b/build/conf/rules.conf deleted file mode 100644 index 9308d3b865..0000000000 --- a/build/conf/rules.conf +++ /dev/null @@ -1,62 +0,0 @@ -when ($OPENSOURCE == "yes") { - PEERDIRS_RULES_PATH= -} -otherwise { - PEERDIRS_RULES_PATH=\ - build/rules/junk.policy \ - build/rules/go/contrib.policy \ - build/rules/go/vendor.policy \ - build/rules/contrib_deprecated.policy \ - build/rules/contrib_python.policy \ - build/rules/contrib_restricted.policy \ - build/rules/contrib_deps.policy \ - build/rules/library_deps.policy \ - build/rules/library_deprecated.policy \ - build/rules/passport.policy \ - build/rules/yt.policy \ - build/rules/catboost.policy \ - build/rules/maps/maps.policy \ - build/rules/taxi.policy \ - build/rules/yp.policy \ - build/rules/alice.policy \ - build/rules/kikimr.policy \ - build/rules/yadi.policy -} - -CHECK_INTERNAL=yes -INTERNAL_EXCEPTIONS=\ - contrib \ - search/begemot/rules/internal \ - mssngr/router/lib/protos/internal \ - mssngr/router/lib/registry/method/internal \ - cv/imageproc/ocr/api/mobile_c/internal \ - kernel/ugc/security/lib/internal \ - maps/mobile/libs/mapkit/internal - -_BLACKLISTS= -when ($DISABLE_BLACKLIST == "yes" || $OPENSOURCE == "yes") { - _BLACKLISTS= -} -elsewhen ($CUSTOM_BLACKLIST != "") { - _BLACKLISTS=$CUSTOM_BLACKLIST -} -elsewhen ($AUTOCHECK == "yes" || $TEST_BLACKLIST_AUTOCHECK == "yes") { - _BLACKLISTS+=build/rules/autocheck.blacklist -} -otherwise { - _BLACKLISTS+=build/rules/local.blacklist -} - -_ISOLATED_PROJECTS= -when ($DISABLE_ISOLATED_PROJECTS == "yes" || $OPENSOURCE == "yes") { - _ISOLATED_PROJECTS= -} -elsewhen ($CUSTOM_ISOLATED_PROJECTS != "") { - _ISOLATED_PROJECTS=$CUSTOM_ISOLATED_PROJECTS -} -elsewhen ($AUTOCHECK == "yes" || $TEST_ISOLATED_PROJECTS_AUTOCHECK == "yes") { - _ISOLATED_PROJECTS=build/rules/autocheck.isolated_projects -} -otherwise { - _ISOLATED_PROJECTS+=build/rules/local.isolated_projects -} diff --git a/build/conf/settings.conf b/build/conf/settings.conf deleted file mode 100644 index 60f146df98..0000000000 --- a/build/conf/settings.conf +++ /dev/null @@ -1,162 +0,0 @@ -GLOBAL_SRCS_IN_RESULTS=yes -JSON_CACHE_IS_ATTACHED=yes -USE_ADDINCL_WITHOUT_FOR_AS_ADDINCL_FOR_C=yes -LANGS_REQUIRE_BUILD_AND_SRC_ROOTS=c asm cython proto flatc swig ydl nlg -CHECK_GO_INCORRECT_DEPS=yes -REPORT_RECURSE_NO_YAMAKE=yes - -CHKPEERS_GLOBAL_SRCS=no -when ($AUTOCHECK == "yes") { - CHKPEERS_GLOBAL_SRCS=yes -} - -# NOTE! Only foldable vars should be listed here -_FOLDABLE_VARS_=\ - CL_WRAPPER \ - END_WHOLE_ARCHIVE_VALUE \ - LD_SDK_VERSION \ - LD_STRIP_FLAG \ - LIB_WRAPPER \ - LINK_EXE_FLAGS_DEBUG \ - LINK_EXE_FLAGS_RELEASE \ - LINK_IMPLIB \ - LINK_LIB_FLAGS \ - LINK_STDLIBS \ - LINK_WRAPPER \ - LINK_WRAPPER_DYNLIB \ - ML_WRAPPER \ - START_WHOLE_ARCHIVE_VALUE \ - _CFLAGS_ARCH_I386 \ - _CFLAGS_UCRT_VC_INCLUDES \ - _COMPILER_TIME_TRACE_FLAGS \ - _COMPILER_TIME_TRACE_GRANULARITY \ - _COMPILER_TIME_TRACE_POSTPROCESS \ - _CPP_ARGS \ - _CROSS_SUFFIX \ - _CXX_DEFINES \ - _CXX_FLAGS \ - _CXX_STD \ - _CXX_WARNINGS \ - _CXX_WARNINGS_CLANG \ - _CXX_WARNINGS_CLANG_CL \ - _CXX_WARNINGS_CLANG_CL_2019 \ - _CXX_WARNINGS_CLANG_CL_2019_IDE_MSVS \ - _CXX_WARNINGS_CLANG_CL_IDE_MSVS \ - _CXX_WARNINGS_GCC_7 \ - _C_ARGS \ - _C_CPP_KV_STYLE \ - _C_DEFINES \ - _C_DEFINES_ANDROID \ - _C_DEFINES_ANDROID_OTHERWISE \ - _C_DEFINES_CLANG_LINUX_X86_64 \ - _C_DEFINES_GNU_SOURCE \ - _C_DEFINES_IOS \ - _C_DEFINES_NDEBUG \ - _C_DEFINES_WITH_VALGRIND \ - _C_FLAGS \ - _C_FLAGS_ARCH \ - _C_FLAGS_ARCH_OPT \ - _C_FLAGS_FAST_DEBUG \ - _C_FLAGS_PROFILER \ - _C_FLAGS_RELEASE \ - _C_FOPTIONS \ - _C_FOPTIONS_ALIGNED_ALLOCATION \ - _C_FOPTIONS_CLANG_10 \ - _C_FOPTIONS_CLANG_10_LINUX \ - _C_FOPTIONS_COLOR \ - _C_FOPTIONS_COVERAGE \ - _C_FOPTIONS_DEBUG \ - _C_FOPTIONS_GCC \ - _C_FOPTIONS_INIT_ARRAY \ - _C_FOPTIONS_IOS \ - _C_FOPTIONS_MAPSMOBI_ARM \ - _C_FOPTIONS_PROFILER \ - _C_FOPTIONS_RELEASE \ - _C_SYSTEM_LIBRARIES \ - _C_WARNINGS \ - _C_WARNINGS_CLANG \ - _C_WARNINGS_CLANG_CL \ - _DEBUG_INFO_FLAGS \ - _DEFINES_ARCH \ - _DEFINES_UNICODE \ - _DEFINES_WIN32_WINNT \ - _DWARF_COMMAND \ - _END_GROUP \ - _EXEC_SHARED_FLAG \ - _EXE_FLAGS \ - _FLAGS_COMMON \ - _FLAGS_COMMON_DEBUG \ - _FLAGS_COMMON_IDE_MSVS \ - _FLAGS_COMMON_LIBPATHS \ - _FLAGS_C_ONLY \ - _FLAGS_DEBUG_ONLY \ - _FLAGS_DEBUG_ONLY_CLANG_CL \ - _FLAGS_DEBUG_ONLY_DEBUG \ - _FLAGS_DEBUG_RUNTIME \ - _FLAGS_IGNORE \ - _FLAGS_MACHINE \ - _FLAGS_MSVS_ONLY \ - _FLAGS_RELEASE_ONLY \ - _FLAGS_RELEASE_ONLY_DEBUG \ - _FLAGS_RELEASE_RUNTIME \ - _LD_ARCHIVER \ - _LD_ARCH_FLAG \ - _LD_AR_PLUGIN \ - _LD_DCE_FLAG_GC_SECTIONS \ - _LD_DCE_FLAG_PRINT_SECTIONS \ - _LD_ENV_STYLE \ - _LD_FLAGS \ - _LD_FLAGS_1 \ - _LD_FLAGS_2 \ - _LD_FLAGS_COVERAGE \ - _LD_FLAGS_IOS_MAPSMOBI_ARM \ - _LD_FLAGS_PROFILER_TYPE \ - _LD_FLAGS_SIZE_OPTIMIZED \ - _LD_ICF_FLAG \ - _LD_ICF_FLAG_PRINT_SECTIONS \ - _LD_LIB_GENERATE_MF \ - _LD_LINKER_OUTPUT\ - _LD_LINKER_OUTPUT_FLAG \ - _LD_LINK_FAT_PREFIX \ - _LD_LINK_FAT_SRCS_GLOBALS_NO_WA \ - _LD_LINK_FAT_SRCS_GLOBALS_WA \ - _LD_LINK_FAT_SUFFIX1 \ - _LD_LINK_FAT_SUFFIX2 \ - _LD_LLVM_AR_FORMAT \ - _LD_SRCS_GLOBALS \ - _LD_SYS_LIB \ - _LD_TAIL_LINK_LIB \ - _LD_THREAD_LIBRARY \ - _LD_USE_STDLIB \ - _LINKER_TIME_TRACE_FLAG \ - _LINKER_TIME_TRACE_GRANULARITY \ - _LINK_EXTRA_OUTPUT \ - _MASM_IO \ - _MSVC_ARCH \ - _MSVC_FLAGS \ - _MSVC_FLAGS_ARCH_OPT \ - _MSVC_FLAGS_CLANG \ - _MSVC_FLAGS_CLANG_ARCH \ - _MSVC_FLAGS_CLANG_EQ_2019 \ - _MSVC_FLAGS_INCLUDE \ - _MSVC_HEAD_LINK_LIB \ - _MSVC_MACRO \ - _MSVC_SRCS_GLOBALS \ - _MSVC_TAIL_LINK_LIB \ - _MSVC_TC_KIT_LIBS \ - _MSVC_TC_VC_ROOT \ - _MSVC_WARNS_AS_ERRORS \ - _MSVC_WARNS_DISABLED \ - _MSVC_WARNS_ENABLED \ - _MSVC_WINDOWS7 \ - _MSVC_WINDOWS8 \ - _OPTIMIZE_RELEASE \ - _SFDL_FLAGS \ - _SHARED_FLAG \ - _SONAME_FLAG \ - _SONAME_OPTION \ - _START_GROUP \ - _STD_CXX \ - _WINAPI_UNICODE \ - -# end of _FOLDABLE_VARS list diff --git a/build/conf/sysincl.conf b/build/conf/sysincl.conf deleted file mode 100644 index 91280a847d..0000000000 --- a/build/conf/sysincl.conf +++ /dev/null @@ -1,65 +0,0 @@ -SYSINCL= -SYSINCL+=build/sysincl/libc-to-compat.yml -SYSINCL+=build/sysincl/libc-to-nothing.yml -SYSINCL+=build/sysincl/stl-to-nothing.yml -SYSINCL+=build/sysincl/linux.yml -SYSINCL+=build/sysincl/windows.yml -SYSINCL+=build/sysincl/darwin.yml -SYSINCL+=build/sysincl/intrinsic.yml -SYSINCL+=build/sysincl/nvidia.yml -SYSINCL+=build/sysincl/misc.yml -SYSINCL+=build/sysincl/unsorted.yml - -when ($USE_LOCAL_SWIG == "yes") { - SYSINCL+=build/sysincl/swig-to-nothing.yml -} -otherwise { - SYSINCL+=build/sysincl/swig.yml -} - -when ($USE_SYSTEM_JDK) { - SYSINCL+=build/sysincl/system-jdk.yml -} - -when ($OPENSOURCE != "yes") { - SYSINCL+=build/yandex_specific/sysincl/speechkit.yml - SYSINCL+=build/yandex_specific/sysincl/sophos.yml - SYSINCL+=build/yandex_specific/sysincl/misc.yml - SYSINCL+=build/yandex_specific/sysincl/taxi.yml -} - -when ($MUSL == "yes") { - SYSINCL+=build/sysincl/libc-to-musl.yml - SYSINCL+=build/sysincl/linux-musl.yml -} - -when ($OS_WINDOWS == "yes") { - SYSINCL+=build/sysincl/misc-win.yml - when ($OPENSOURCE !="yes") { - SYSINCL+=build/yandex_specific/sysincl/misc-win.yml - } -} - -when ($OS_ANDROID == "yes") { - SYSINCL+=build/sysincl/android.yml -} - -when ($OS_LINUX != "yes") { - SYSINCL+=build/sysincl/linux-headers.yml -} - -when ($OS_LINUX != "yes" || $CATBOOST_OPENSOURCE == "yes") { - SYSINCL+=build/sysincl/ibdrv.yml -} - -when ($WITH_VALGRIND == "yes") { - SYSINCL+=build/sysincl/valgrind.yml -} - -when ($OS_LINUX == "yes" && $OS_SDK == "ubuntu-12") { - SYSINCL+=build/sysincl/linux-ubuntu-12.yml -} - -when ($ARCH_NDS32) { - SYSINCL+=build/sysincl/nds32.yml -} diff --git a/build/conf/toolchains/gnu_toolchain.conf b/build/conf/toolchains/gnu_toolchain.conf deleted file mode 100644 index e69de29bb2..0000000000 --- a/build/conf/toolchains/gnu_toolchain.conf +++ /dev/null diff --git a/build/conf/toolchains/msvc_toolchain.conf b/build/conf/toolchains/msvc_toolchain.conf deleted file mode 100644 index 6b4d6b5c45..0000000000 --- a/build/conf/toolchains/msvc_toolchain.conf +++ /dev/null @@ -1,7 +0,0 @@ -# TODO(somov): Заглушка для тех мест, где C_FLAGS_PLATFORM используется -# для любых платформ. Нужно унифицировать с GnuToolchain. -C_FLAGS_PLATFORM= - -when ($_UNDER_WINE == "yes") { - WINE_ENV=${env:"WINEPREFIX_SUFFIX=4.0"} -} diff --git a/build/conf/ts.conf b/build/conf/ts.conf deleted file mode 100644 index 1c10daccbf..0000000000 --- a/build/conf/ts.conf +++ /dev/null @@ -1,149 +0,0 @@ -NODEJS_ROOT=$NODEJS_RESOURCE_GLOBAL -NODEJS_BIN=$NODEJS_ROOT/node -PNPM_ROOT=$PNPM_RESOURCE_GLOBAL -PNPM_SCRIPT=$PNPM_ROOT/pnpm.js -TSC_ROOT=$TS_COMPILER_RESOURCE_GLOBAL/typescript -TSC_SCRIPT=$TSC_ROOT/lib/tsc.js -WEBPACK_ROOT=$WEBPACK_RESOURCE_GLOBAL/node_modules -WEBPACK_SCRIPT=$WEBPACK_ROOT/.bin/webpack -ESLINT_ROOT=$ESLINT_RESOURCE_GLOBAL -ESLINT_SCRIPT=$ESLINT_ROOT/node_modules/.bin/eslint -NOTS_TOOL=${tool:"tools/nots"} -NOTS_TOOL_BASE_ARGS=--build-root $ARCADIA_BUILD_ROOT --bindir $BINDIR --curdir $CURDIR --nodejs-bin $NODEJS_BIN - -NPM_CONTRIBS_PATH=devtools/dummy_arcadia/ts/contribs - -### @usage: NPM_CONTRIBS() # internal -### -### Defines special module that provides contrib tarballs from internal npm registry. -### Should be used only with `NODE_MODULES` macro. -### -### @see [FROM_NPM_LOCKFILES()](#macro_FROM_NPM_LOCKFILES) -### @see [NODE_MODULES()](#macro_NODE_MODULES) -module NPM_CONTRIBS: _BASE_UNIT { - .CMD=TOUCH_UNIT - .PEERDIR_POLICY=as_build_from - .FINAL_TARGET=no - .ALLOWED=FROM_NPM_LOCKFILES - .RESTRICTED=PEERDIR - - SET(MODULE_TAG NPM_CONTRIBS) - - MODULE_SUFFIX=.fake - - _BARE_MODULE() -} - -### @usage: FROM_NPM_LOCKFILES(LOCKFILES...) # internal -### -### Defines lockfile list for `NPM_CONTRIBS` module. -### -### @see [NPM_CONTRIBS()](#module_NPM_CONTRIBS) -macro FROM_NPM_LOCKFILES(LOCKFILES...) { - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS $LOCKFILES) - # See implementation in build/plugins/nots.py - _FROM_NPM_LOCKFILES($LOCKFILES) -} - -### @usage: FROM_NPM(NAME VERSION SKY_ID INTEGRITY INTEGRITY_ALGO TARBALL_PATH) -macro FROM_NPM(NAME, VERSION, SKY_ID, INTEGRITY, INTEGRITY_ALGO, TARBALL_PATH) { - .CMD=${cwd:BINDIR} $YMAKE_PYTHON ${input:"build/scripts/fetch_from_npm.py"} ${input;hide:"build/scripts/fetch_from.py"} ${input;hide:"build/scripts/sky.py"} --name $NAME --version $VERSION --sky-id $SKY_ID --integrity $INTEGRITY --integrity-algorithm $INTEGRITY_ALGO --copy-to ${output:TARBALL_PATH} ${requirements;hide:"network:full"} ${kv;hide:"p NP"} ${kv;hide:"pc yellow"} -} - -### @usage: NODE_MODULES() -### -### Materializes `node_modules.tar` bundle according to the module's lockfile. -### -### @see [NPM_CONTRIBS()](#module_NPM_CONTRIBS) -macro NODE_MODULES() { - # See implementation in build/plugins/nots.py -} - -_NODE_MODULES_INPUTS= - -macro _NODE_MODULES(IN{input}[], OUT{output}[]) { - PEERDIR($NPM_CONTRIBS_PATH) - SET(_NODE_MODULES_INPUTS \${input;hide:node_modules.tar}) - - .CMD=${cwd:BINDIR} $NOTS_TOOL create-node-modules $NOTS_TOOL_BASE_ARGS --pnpm-script $PNPM_SCRIPT --contribs $NPM_CONTRIBS_PATH ${input;hide:IN} ${output;global;hide:OUT} ${kv;hide:"p NM"} ${kv;hide:"pc yellow"} -} - -module _TS_BASE_UNIT: _BASE_UNIT { - SET(MODULE_TAG TS) - SET(PEERDIR_TAGS TS NPM_CONTRIBS) - - PEERDIR(build/platform/nodejs) - PEERDIR(build/external_resources/pnpm) - PEERDIR(build/external_resources/typescript) - - MODULE_SUFFIX=.fake - - _BARE_MODULE() -} - -TS_CONFIG_PATH=tsconfig.json - -TS_COMPILE=${cwd:BINDIR} $NOTS_TOOL compile-ts $NOTS_TOOL_BASE_ARGS --tsc-script $TSC_SCRIPT --config ${input:TS_CONFIG_PATH} ${hide:PEERS} $_NODE_MODULES_INPUTS ${output;hide:"package.json"} ${kv;hide:"p FE"} ${kv;hide:"pc yellow"} && $TOUCH_UNIT - -### @usage: TS_LIBRARY([name]) -### -### The TypeScript/JavaScript library module, compiles TypeScript sources to JavaScript. -### Build results are JavaScript files, typings and source mappings (depending on local tsconfig.json settings). -### -### @see [NODE_MODULES()](#macro_NODE_MODULES) -### @example -### -### TS_LIBRARY() -### SRCS(src/index.ts) -### NODE_MODULES() -### END() -### -module TS_LIBRARY : _TS_BASE_UNIT { - .CMD=TS_COMPILE - .FINAL_TARGET=yes - .PEERDIR_POLICY=as_build_from - .EPILOGUE=_TS_LIBRARY_EPILOGUE - - PEERDIR(build/external_resources/eslint) - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/${TS_CONFIG_PATH} ${CURDIR}/package.json) - SET(TS_CONFIG_DEDUCE_OUT yes) - - _TS_CONFIGURE($TS_CONFIG_PATH) -} - -WEBPACK_CONFIG_PATH=webpack.config.js - -TS_BUNDLE_WEBPACK=${cwd:BINDIR} $NOTS_TOOL bundle-webpack $NOTS_TOOL_BASE_ARGS --webpack-resource $WEBPACK_ROOT --webpack-script $WEBPACK_SCRIPT --webpack-config ${input:WEBPACK_CONFIG_PATH} --ts-config ${input:TS_CONFIG_PATH} ${hide:PEERS} $_NODE_MODULES_INPUTS ${output;hide:"bundle.tar"} ${kv;hide:"p FE"} ${kv;hide:"pc yellow"} && $TOUCH_UNIT - -### @usage: TS_BUNDLE([name]) -### -### The Webpack bundle, bundles JavaScript code. -### Build results are bundle.tar, typings and source mappings (depending on local tsconfig.json settings). -### -### @see [NODE_MODULES()](#macro_NODE_MODULES) -### @example -### -### TS_BUNDLE() -### SRCS(src/index.ts) -### NODE_MODULES() -### END() -### -module TS_BUNDLE : _TS_BASE_UNIT { - .CMD=TS_BUNDLE_WEBPACK - .FINAL_TARGET=yes - .PEERDIR_POLICY=as_build_from - - PEERDIR(build/external_resources/webpack) - SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/${TS_CONFIG_PATH} ${CURDIR}/${WEBPACK_CONFIG_PATH} ${CURDIR}/package.json) - SET(TS_CONFIG_DEDUCE_OUT no) - - _TS_CONFIGURE($TS_CONFIG_PATH) -} - -_TS_LINT_SRCS_VALUE= -### _TS_LIBRARY_EPILOGUE() # internal -### -### This macro executes macros which should be invoked after all user specified macros in the ya.make file -macro _TS_LIBRARY_EPILOGUE() { - _GLOB(_TS_LINT_SRCS_VALUE ${CURDIR}/**/*.(ts|tsx) EXCLUDE **/node_modules/**/*.(ts|tsx)) -} |