summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsvidyuk <[email protected]>2025-03-31 05:05:40 +0300
committersvidyuk <[email protected]>2025-03-31 05:18:31 +0300
commit79ff08a2da256291def48e53ca02343cf6f752be (patch)
tree534bb9ccd3f70426a3fbce0da00b214b0a6d0395
parente64230ea06a79c4e1bbd6eff06fe9cd49201178a (diff)
Disable PGO instrumentation for emit-llvm commands
commit_hash:fa0c60793bc8b4a9379b6fbd8bd8d2e462b05ad2
-rw-r--r--build/ymake.core.conf11
1 files changed, 7 insertions, 4 deletions
diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index b5173c0ebb4..a71f3268083 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -727,10 +727,12 @@ module _BASE_UNIT: _BARE_UNIT {
when ($CLANG) {
when ($PGO_ADD == "yes") {
CFLAGS+=-fprofile-instr-generate
+ NO_PGO_CFLAGS=-fno-profile-instr-generate
LDFLAGS+=-fprofile-instr-generate
}
when ($PGO_PATH) {
CFLAGS+=-fprofile-instr-use=$PGO_PATH -Wno-profile-instr-unprofiled -Wno-profile-instr-out-of-date
+ NO_PGO_CFLAGS=-fno-profile-instr-use
LDFLAGS+=-fprofile-instr-use=$PGO_PATH
}
}
@@ -2828,6 +2830,7 @@ SSE4_CFLAGS=
XOP_CFLAGS=
NO_LTO_CFLAGS=
+NO_PGO_CFLAGS=
# tag:cpu
when (($ARCH_X86_64 || $ARCH_I386) && $DISABLE_INSTRUCTION_SETS != "yes") {
@@ -4722,8 +4725,8 @@ macro CLANG_EMIT_AST_CXX(Input, Output, Opts...) {
### Emit LLVM bytecode from .cpp file. BC_CXXFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
- .SEM=target_macroses-ITEM && target_macroses-macro llvm_compile_cxx && target_macroses-args ${input:Input} ${noauto;output:Output} ${"${CLANGPLUSPLUS}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm ${Opts}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang++ ${pre=-I:_C__INCLUDE} $BC_CXXFLAGS $C_FLAGS_PLATFORM -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} $NO_PGO_CFLAGS -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
+ .SEM=target_macroses-ITEM && target_macroses-macro llvm_compile_cxx && target_macroses-args ${input:Input} ${noauto;output:Output} ${"${CLANGPLUSPLUS}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} $NO_PGO_CFLAGS -emit-llvm ${Opts}
.STRUCT_CMD=yes
when ($CLANG_BC_ROOT == "") {
_OK = no
@@ -4737,8 +4740,8 @@ macro LLVM_COMPILE_CXX(Input, Output, Opts...) {
### Emit LLVM bytecode from .c file. BC_CFLAGS, LLVM_OPTS and C_FLAGS_PLATFORM are passed in, while CFLAGS are not.
### Note: Output name is used as is, no extension added.
macro LLVM_COMPILE_C(Input, Output, Opts...) {
- .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
- .SEM=target_macroses-ITEM && target_macroses-macro llvm_compile_c && target_macroses-args ${input:Input} ${noauto;output:Output} ${"${CLANGC}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} -emit-llvm ${Opts}
+ .CMD=$YMAKE_PYTHON ${input:"build/scripts/clang_wrapper.py"} $WINDOWS ${CLANG_BC_ROOT}/bin/clang ${pre=-I:_C__INCLUDE} $BC_CFLAGS $C_FLAGS_PLATFORM $LLVM_OPTS ${NO_LTO_CFLAGS} $NO_PGO_CFLAGS -emit-llvm -c ${input:Input} -o ${noauto;output:Output} $Opts ${hide;kv:"p BC"} ${hide;kv:"pc light-green"}
+ .SEM=target_macroses-ITEM && target_macroses-macro llvm_compile_c && target_macroses-args ${input:Input} ${noauto;output:Output} ${"${CLANGC}"} -Wno-unknown-warning-option $LLVM_OPTS ${NO_LTO_CFLAGS} $NO_PGO_CFLAGS -emit-llvm ${Opts}
.STRUCT_CMD=yes
when ($CLANG_BC_ROOT == "") {
_OK = no