Skip to content
Snippets Groups Projects
Commit 9fd0a90f authored by Christoph Hasse's avatar Christoph Hasse :cartwheel_tone1:
Browse files

disable debuginfo for JIT compiled functors unless explicitly required

parent 41917e98
No related branches found
No related tags found
1 merge request!2699FunctorFactory, replace CLING backend with native compiler
......@@ -45,7 +45,8 @@ function(thor_functor_cache cache_name)
# make sure that the intall directory already exists otherwise the
# compilation job will fail!
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
COMMAND ${CMAKE_BINARY_DIR}/run env FUNCTOR_JIT_LIBDIR=${CACHE_LIB_DIR} gaudirun.py ${ARG_OPTIONS}
# set FUNCTOR_JIT_EXTRA_ARGS to overwrite the default value of "-g0"
COMMAND ${CMAKE_BINARY_DIR}/run env FUNCTOR_JIT_EXTRA_ARGS="" FUNCTOR_JIT_LIBDIR=${CACHE_LIB_DIR} gaudirun.py ${ARG_OPTIONS}
# This file is only created as dependency proxy as we don't know the output
# file name the JIT library
COMMAND touch ${cache_name}.stamp
......
......@@ -149,16 +149,24 @@ my_env['LIBRARY_PATH'] = my_env['LD_LIBRARY_PATH']
if len(sys.argv) != 3:
raise Exception('expect two arguments! e.g. functor_jitter input.cpp output.so')
# debug info is only needed for debugging or the throughput tests. Those jobs
# should set this env var otherwise if not set we explicitly force the debug
# level to zero to reduce memory and compilation time overhead of JIT by a
# factor of >2
extra_args = os.environ.get('FUNCTOR_JIT_EXTRA_ARGS', '-g0')
cmd = '''
${CMAKE_CXX_COMPILER_CONTENT}'''
exit(sp.call(cmd + ' -std=c++${GAUDI_CXX_STANDARD} \
cmd = cmd + ' -std=c++${GAUDI_CXX_STANDARD} \
-D$<JOIN:$<REMOVE_DUPLICATES:$<TARGET_PROPERTY:FunctorCoreLib,COMPILE_DEFINITIONS>>, -D> \
${no_pedantic} \
${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}} -fPIC -shared \
-include {0}/include/${preprocessed_header_name} \
{3} -include {0}/include/${preprocessed_header_name} \
-lFunctorCore -lParticleCombiners -lTrackEvent -lPhysEvent -lMCEvent -lRecEvent -lHltEvent \
-o {1} {2}'.format(base_dir, sys.argv[2], sys.argv[1] ), shell=True, env=my_env))
-o {1} {2}'.format(base_dir, sys.argv[2], sys.argv[1], extra_args)
exit(sp.call(cmd, shell=True, env=my_env))
")
set(JIT_CMD_FILE "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/functor_jitter")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment