2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-28 03:35:19 +01:00

scripts: waifulib: compiler_optimizations: fix linking OpenMP

This commit is contained in:
Alibek Omarov 2024-05-06 15:36:26 +03:00
parent 75a315ecf0
commit 103b9724f9

View File

@ -127,6 +127,11 @@ OPENMP_CFLAGS = {
'msvc': ['/openmp']
}
OPENMP_LINKFLAGS = {
'gcc': ['-fopenmp'],
'clang': ['-fopenmp'],
}
PROFILE_GENERATE_CFLAGS = {
'gcc': ['-fprofile-generate=xash3d-prof'],
}
@ -214,6 +219,7 @@ def get_optimization_flags(conf):
cflags += conf.get_flags_by_compiler(POLLY_CFLAGS, conf.env.COMPILER_CC)
if conf.options.OPENMP:
linkflags+= conf.get_flags_by_compiler(OPENMP_LINKFLAGS, conf.env.COMPILER_CC)
cflags += conf.get_flags_by_compiler(OPENMP_CFLAGS, conf.env.COMPILER_CC)
if conf.options.PROFILE_GENERATE: