mirror of
https://github.com/matrix-construct/construct
synced 2024-12-25 06:53:58 +01:00
ircd: Add target to preprocess PGO data bundled in text form.
matrix: Add target to preprocess PGO data bundled in text form.
This commit is contained in:
parent
d0edf478ab
commit
770fabcacd
6 changed files with 51 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@ Makefile
|
|||
*.gch
|
||||
*.cache
|
||||
*.tmp
|
||||
*.profdata
|
||||
.deps
|
||||
.dirstamp
|
||||
.libs
|
||||
|
|
|
@ -429,6 +429,12 @@ dnl ])
|
|||
|
||||
AM_CONDITIONAL([PROFILE], [[[[ "$profiling" = "yes" ]]]])
|
||||
|
||||
dnl Provide the correct target to the Makefiles
|
||||
AM_COND_IF(CLANG9, [ AC_PATH_PROG(LLVM_PROFDATA, llvm-profdata-9) ])
|
||||
AM_COND_IF(CLANG10, [ AC_PATH_PROG(LLVM_PROFDATA, llvm-profdata-10) ])
|
||||
AM_COND_IF(CLANG11, [ AC_PATH_PROG(LLVM_PROFDATA, llvm-profdata-11) ])
|
||||
AM_COND_IF(CLANG12, [ AC_PATH_PROG(LLVM_PROFDATA, llvm-profdata-12) ])
|
||||
|
||||
dnl
|
||||
dnl Precompiled headers
|
||||
dnl
|
||||
|
@ -872,6 +878,7 @@ AM_COND_IF([DEBUG],
|
|||
AM_COND_IF([CLANG],
|
||||
[
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wno-unknown-attributes], charybdis_cv_c_gcc_w_unknown_attributes)
|
||||
CHARYBDIS_C_GCC_TRY_FLAGS([-Wno-profile-instr-unprofiled], charybdis_cv_c_gcc_w_profile_instr_unprofiled)
|
||||
])
|
||||
|
||||
AM_COND_IF([GCC],
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
BUILT_SOURCES =#
|
||||
CLEANFILES =#
|
||||
|
||||
DEFS += \
|
||||
-DIRCD_UNIT \
|
||||
###
|
||||
|
@ -50,9 +53,12 @@ AM_CXXFLAGS += -fwhole-program-vtables
|
|||
endif
|
||||
endif
|
||||
|
||||
if MINGW
|
||||
AM_LDFLAGS += -Wl,--enable-runtime-pseudo-reloc
|
||||
AM_LDFLAGS += -export-symbols-regex '*'
|
||||
if !PROFILE
|
||||
if CLANG
|
||||
AM_CXXFLAGS += -fprofile-use
|
||||
BUILT_SOURCES += default.profdata
|
||||
CLEANFILES += default.profdata
|
||||
endif
|
||||
endif
|
||||
|
||||
if PROFILE
|
||||
|
@ -67,9 +73,10 @@ AM_LDFLAGS += -Wl,-fprofile-generate
|
|||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# libircd
|
||||
#
|
||||
if MINGW
|
||||
AM_LDFLAGS += -Wl,--enable-runtime-pseudo-reloc
|
||||
AM_LDFLAGS += -export-symbols-regex '*'
|
||||
endif
|
||||
|
||||
libircddir = @libdir@
|
||||
libircd_LTLIBRARIES = libircd.la
|
||||
|
@ -132,6 +139,7 @@ endif
|
|||
#
|
||||
|
||||
libircd_la_SOURCES =#
|
||||
libircd_la_SOURCES += default.profdata
|
||||
libircd_la_SOURCES += assert.cc
|
||||
libircd_la_SOURCES += info.cc
|
||||
libircd_la_SOURCES += vg.cc
|
||||
|
@ -234,14 +242,6 @@ libircd_la_SOURCES += ircd.cc
|
|||
# Specific unit configurations
|
||||
#
|
||||
|
||||
if CLANG
|
||||
if !PROFILE
|
||||
if !DEBUG
|
||||
SPIRIT_UNIT_CXXFLAGS += -fprofile-use
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
client.lo: AM_CPPFLAGS := ${ASIO_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
ctx_x86_64.lo: AM_CPPFLAGS := -I$(top_srcdir)/include
|
||||
ctx.lo: AM_CPPFLAGS := ${ASIO_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
|
@ -305,3 +305,11 @@ server.lo: AM_CPPFLAGS := ${ASIO_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
|||
if SODIUM
|
||||
sodium.lo: AM_CPPFLAGS := @SODIUM_CPPFLAGS@ ${AM_CPPFLAGS}
|
||||
endif
|
||||
|
||||
#
|
||||
# Other recipes
|
||||
#
|
||||
|
||||
# LLVM PGO text to binary for -fprofile-use
|
||||
default.profdata:
|
||||
-$(LLVM_PROFDATA) merge -output=default.profdata default.proftext
|
||||
|
|
0
ircd/default.proftext
Normal file
0
ircd/default.proftext
Normal file
|
@ -1,5 +1,8 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
BUILT_SOURCES =#
|
||||
CLEANFILES =#
|
||||
|
||||
DEFS += \
|
||||
-DIRCD_UNIT \
|
||||
-DIRCD_MATRIX_UNIT \
|
||||
|
@ -49,10 +52,16 @@ AM_CXXFLAGS += -fwhole-program-vtables
|
|||
endif
|
||||
endif
|
||||
|
||||
if !PROFILE
|
||||
if CLANG
|
||||
AM_CXXFLAGS += -fprofile-use
|
||||
BUILT_SOURCES += default.profdata
|
||||
CLEANFILES += default.profdata
|
||||
endif
|
||||
endif
|
||||
|
||||
if MINGW
|
||||
AM_LDFLAGS += \
|
||||
-Wl,--enable-runtime-pseudo-reloc \
|
||||
###
|
||||
AM_LDFLAGS += -Wl,--enable-runtime-pseudo-reloc
|
||||
endif
|
||||
|
||||
libircd_matrixdir = @libdir@
|
||||
|
@ -65,6 +74,7 @@ libircd_matrix_LTLIBRARIES = \
|
|||
#
|
||||
|
||||
libircd_matrix_la_SOURCES =#
|
||||
libircd_matrix_la_SOURCES += default.profdata
|
||||
libircd_matrix_la_SOURCES += name.cc
|
||||
libircd_matrix_la_SOURCES += id.cc
|
||||
libircd_matrix_la_SOURCES += dbs.cc
|
||||
|
@ -181,3 +191,11 @@ libircd_matrix_la_SOURCES += matrix.cc
|
|||
|
||||
id.lo: AM_CPPFLAGS := ${SPIRIT_UNIT_CPPFLAGS} ${AM_CPPFLAGS}
|
||||
id.lo: CXXFLAGS += ${SPIRIT_UNIT_CXXFLAGS} ${AM_CXXFLAGS}
|
||||
|
||||
#
|
||||
# Other recipes
|
||||
#
|
||||
|
||||
# LLVM PGO text to binary for -fprofile-use
|
||||
default.profdata:
|
||||
-$(LLVM_PROFDATA) merge -output=default.profdata default.proftext
|
||||
|
|
0
matrix/default.proftext
Normal file
0
matrix/default.proftext
Normal file
Loading…
Reference in a new issue