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
1 changed files with 6 additions and 0 deletions

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: