SConscript (12797:fc61ae2a54bd) | SConscript (13508:8fe5d0294e51) |
---|---|
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 --- 1254 unchanged lines hidden (view full) --- 1263 if match and match.group(1) in target_types: 1264 return match.group(1) 1265 return 'all' 1266 1267needed_envs = [identifyTarget(target) for target in BUILD_TARGETS] 1268if 'all' in needed_envs: 1269 needed_envs += target_types 1270 | 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 --- 1254 unchanged lines hidden (view full) --- 1263 if match and match.group(1) in target_types: 1264 return match.group(1) 1265 return 'all' 1266 1267needed_envs = [identifyTarget(target) for target in BUILD_TARGETS] 1268if 'all' in needed_envs: 1269 needed_envs += target_types 1270 |
1271disable_partial = False 1272if env['PLATFORM'] == 'darwin': 1273 # Up until Apple LLVM version 10.0.0 (clang-1000.11.45.5), partial 1274 # linked objects do not expose symbols that are marked with the 1275 # hidden visibility and consequently building gem5 on Mac OS 1276 # fails. As a workaround, we disable partial linking, however, we 1277 # may want to revisit in the future. 1278 disable_partial = True 1279 |
|
1271# Debug binary 1272if 'debug' in needed_envs: 1273 makeEnv(env, 'debug', '.do', 1274 CCFLAGS = Split(ccflags['debug']), 1275 CPPDEFINES = ['DEBUG', 'TRACING_ON=1'], | 1280# Debug binary 1281if 'debug' in needed_envs: 1282 makeEnv(env, 'debug', '.do', 1283 CCFLAGS = Split(ccflags['debug']), 1284 CPPDEFINES = ['DEBUG', 'TRACING_ON=1'], |
1276 LINKFLAGS = Split(ldflags['debug'])) | 1285 LINKFLAGS = Split(ldflags['debug']), 1286 disable_partial=disable_partial) |
1277 1278# Optimized binary 1279if 'opt' in needed_envs: 1280 makeEnv(env, 'opt', '.o', 1281 CCFLAGS = Split(ccflags['opt']), 1282 CPPDEFINES = ['TRACING_ON=1'], | 1287 1288# Optimized binary 1289if 'opt' in needed_envs: 1290 makeEnv(env, 'opt', '.o', 1291 CCFLAGS = Split(ccflags['opt']), 1292 CPPDEFINES = ['TRACING_ON=1'], |
1283 LINKFLAGS = Split(ldflags['opt'])) | 1293 LINKFLAGS = Split(ldflags['opt']), 1294 disable_partial=disable_partial) |
1284 1285# "Fast" binary 1286if 'fast' in needed_envs: | 1295 1296# "Fast" binary 1297if 'fast' in needed_envs: |
1287 disable_partial = \ | 1298 disable_partial = disable_partial and \ |
1288 env.get('BROKEN_INCREMENTAL_LTO', False) and \ 1289 GetOption('force_lto') 1290 makeEnv(env, 'fast', '.fo', strip = True, 1291 CCFLAGS = Split(ccflags['fast']), 1292 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], 1293 LINKFLAGS = Split(ldflags['fast']), 1294 disable_partial=disable_partial) 1295 1296# Profiled binary using gprof 1297if 'prof' in needed_envs: 1298 makeEnv(env, 'prof', '.po', 1299 CCFLAGS = Split(ccflags['prof']), 1300 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], | 1299 env.get('BROKEN_INCREMENTAL_LTO', False) and \ 1300 GetOption('force_lto') 1301 makeEnv(env, 'fast', '.fo', strip = True, 1302 CCFLAGS = Split(ccflags['fast']), 1303 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], 1304 LINKFLAGS = Split(ldflags['fast']), 1305 disable_partial=disable_partial) 1306 1307# Profiled binary using gprof 1308if 'prof' in needed_envs: 1309 makeEnv(env, 'prof', '.po', 1310 CCFLAGS = Split(ccflags['prof']), 1311 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], |
1301 LINKFLAGS = Split(ldflags['prof'])) | 1312 LINKFLAGS = Split(ldflags['prof']), 1313 disable_partial=disable_partial) |
1302 1303# Profiled binary using google-pprof 1304if 'perf' in needed_envs: 1305 makeEnv(env, 'perf', '.gpo', 1306 CCFLAGS = Split(ccflags['perf']), 1307 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], | 1314 1315# Profiled binary using google-pprof 1316if 'perf' in needed_envs: 1317 makeEnv(env, 'perf', '.gpo', 1318 CCFLAGS = Split(ccflags['perf']), 1319 CPPDEFINES = ['NDEBUG', 'TRACING_ON=0'], |
1308 LINKFLAGS = Split(ldflags['perf'])) | 1320 LINKFLAGS = Split(ldflags['perf']), 1321 disable_partial=disable_partial) |