SConscript (12303:70f8400b7ed3) | SConscript (12304:299452fa8cc4) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 938 unchanged lines hidden (view full) --- 947 libname = 'gem5_' + label 948 exename = 'gem5.' + label 949 secondary_exename = 'm5.' + label 950 951 new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's') 952 new_env.Label = label 953 new_env.Append(**kwargs) 954 | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 938 unchanged lines hidden (view full) --- 947 libname = 'gem5_' + label 948 exename = 'gem5.' + label 949 secondary_exename = 'm5.' + label 950 951 new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's') 952 new_env.Label = label 953 new_env.Append(**kwargs) 954 |
955 if env['GCC']: 956 # The address sanitizer is available for gcc >= 4.8 957 if GetOption('with_asan'): 958 if GetOption('with_ubsan') and \ 959 compareVersions(env['GCC_VERSION'], '4.9') >= 0: 960 new_env.Append(CCFLAGS=['-fsanitize=address,undefined', 961 '-fno-omit-frame-pointer']) 962 new_env.Append(LINKFLAGS='-fsanitize=address,undefined') 963 else: 964 new_env.Append(CCFLAGS=['-fsanitize=address', 965 '-fno-omit-frame-pointer']) 966 new_env.Append(LINKFLAGS='-fsanitize=address') 967 # Only gcc >= 4.9 supports UBSan, so check both the version 968 # and the command-line option before adding the compiler and 969 # linker flags. 970 elif GetOption('with_ubsan') and \ 971 compareVersions(env['GCC_VERSION'], '4.9') >= 0: 972 new_env.Append(CCFLAGS='-fsanitize=undefined') 973 new_env.Append(LINKFLAGS='-fsanitize=undefined') 974 975 976 if env['CLANG']: 977 # We require clang >= 3.1, so there is no need to check any 978 # versions here. 979 if GetOption('with_ubsan'): 980 if GetOption('with_asan'): 981 new_env.Append(CCFLAGS=['-fsanitize=address,undefined', 982 '-fno-omit-frame-pointer']) 983 new_env.Append(LINKFLAGS='-fsanitize=address,undefined') 984 else: 985 new_env.Append(CCFLAGS='-fsanitize=undefined') 986 new_env.Append(LINKFLAGS='-fsanitize=undefined') 987 988 elif GetOption('with_asan'): 989 new_env.Append(CCFLAGS=['-fsanitize=address', 990 '-fno-omit-frame-pointer']) 991 new_env.Append(LINKFLAGS='-fsanitize=address') 992 | |
993 werror_env = new_env.Clone() 994 # Treat warnings as errors but white list some warnings that we 995 # want to allow (e.g., deprecation warnings). 996 werror_env.Append(CCFLAGS=['-Werror', 997 '-Wno-error=deprecated-declarations', 998 '-Wno-error=deprecated', 999 ]) 1000 --- 211 unchanged lines hidden --- | 955 werror_env = new_env.Clone() 956 # Treat warnings as errors but white list some warnings that we 957 # want to allow (e.g., deprecation warnings). 958 werror_env.Append(CCFLAGS=['-Werror', 959 '-Wno-error=deprecated-declarations', 960 '-Wno-error=deprecated', 961 ]) 962 --- 211 unchanged lines hidden --- |