Skip to content

Commit

Permalink
Clean up gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Oct 7, 2022
1 parent 03cc41e commit f90c259
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cm-mlops/script/get-gcc/customize.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,23 @@ def postprocess(i):
env['CM_COMPILER_VERSION'] = env['CM_GCC_VERSION']
env['CM_GCC_CACHE_TAGS'] = 'version-'+version
env['CM_COMPILER_CACHE_TAGS'] = 'version-'+version+',family-gcc'

found_file_path = env['CM_GCC_BIN_WITH_PATH']

found_path = os.path.dirname(found_file_path)

found_path = env['CM_GCC_INSTALLED_PATH']
env['CM_GCC_INSTALLED_PATH'] = found_path

file_name_c = env['FILE_NAME_C']
file_name_c = os.path.basename(found_file_path)
# G: changed next line to handle cases like gcc-8
env['FILE_NAME_CPP'] = env['FILE_NAME_C'].replace('gcc','g++')
file_name_cpp = env['FILE_NAME_CPP']
file_name_cpp = env['FILE_NAME_C'].replace('gcc','g++')
env['FILE_NAME_CPP'] = file_name_cpp

env['CM_GCC_BIN']=file_name_c
env['CM_GCC_BIN_WITH_PATH']=os.path.join(found_path, file_name_c)

# General compiler for general program compilation
env['CM_C_COMPILER_BIN']=file_name_c
env['CM_C_COMPILER_WITH_PATH']=os.path.join(found_path, file_name_c)
env['CM_C_COMPILER_WITH_PATH']=found_file_path

env['CM_CXX_COMPILER_BIN']=file_name_cpp
env['CM_CXX_COMPILER_WITH_PATH']=os.path.join(found_path, file_name_cpp)
Expand Down

0 comments on commit f90c259

Please sign in to comment.