mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00
configure: Remove device specific defines
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: Tom Stellard <tom@stellard.net> llvm-svn: 273044
This commit is contained in:
parent
5fd84d028d
commit
e97deffb6a
@ -91,26 +91,18 @@ if not cxx_compiler:
|
|||||||
|
|
||||||
available_targets = {
|
available_targets = {
|
||||||
'r600--' : { 'devices' :
|
'r600--' : { 'devices' :
|
||||||
[{'gpu' : 'cedar', 'aliases' : ['palm', 'sumo', 'sumo2', 'redwood', 'juniper'],
|
[{'gpu' : 'cedar', 'aliases' : ['palm', 'sumo', 'sumo2', 'redwood', 'juniper']},
|
||||||
'defines' : {}},
|
{'gpu' : 'cypress', 'aliases' : ['hemlock'] },
|
||||||
{'gpu' : 'cypress', 'aliases' : ['hemlock'],
|
{'gpu' : 'barts', 'aliases' : ['turks', 'caicos'] },
|
||||||
'defines' : {}},
|
{'gpu' : 'cayman', 'aliases' : ['aruba']} ]},
|
||||||
{'gpu' : 'barts', 'aliases' : ['turks', 'caicos'],
|
|
||||||
'defines' : {}},
|
|
||||||
{'gpu' : 'cayman', 'aliases' : ['aruba'],
|
|
||||||
'defines' : {}} ]},
|
|
||||||
'amdgcn--': { 'devices' :
|
'amdgcn--': { 'devices' :
|
||||||
[{'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland', 'hainan', 'bonaire', 'kabini', 'kaveri', 'hawaii','mullins','tonga','carrizo','iceland','fiji','stoney'],
|
[{'gpu' : 'tahiti', 'aliases' : ['pitcairn', 'verde', 'oland', 'hainan', 'bonaire', 'kabini', 'kaveri', 'hawaii','mullins','tonga','carrizo','iceland','fiji','stoney']} ]},
|
||||||
'defines' : {}} ]},
|
|
||||||
'amdgcn--amdhsa': { 'devices' :
|
'amdgcn--amdhsa': { 'devices' :
|
||||||
[{'gpu' : '', 'aliases' : ['bonaire', 'hawaii', 'kabini', 'kaveri', 'mullins', 'carrizo', 'stoney', 'fiji', 'iceland', 'tonga'],
|
[{'gpu' : '', 'aliases' : ['bonaire', 'hawaii', 'kabini', 'kaveri', 'mullins', 'carrizo', 'stoney', 'fiji', 'iceland', 'tonga']} ]},
|
||||||
'defines' : {}} ]},
|
'nvptx--' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
|
||||||
'nvptx--' : { 'devices' : [{'gpu' : '', 'aliases' : [], 'defines' : {}} ]},
|
'nvptx64--' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
|
||||||
'nvptx64--' : { 'devices' : [{'gpu' : '', 'aliases' : [], 'defines' : {}} ]},
|
'nvptx--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
|
||||||
'nvptx--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : [],
|
'nvptx64--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : []} ]},
|
||||||
'defines' : {}} ]},
|
|
||||||
'nvptx64--nvidiacl' : { 'devices' : [{'gpu' : '', 'aliases' : [],
|
|
||||||
'defines' : {}} ]},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--', 'amdgcn--', 'amdgcn--amdhsa']
|
default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--', 'amdgcn--', 'amdgcn--amdhsa']
|
||||||
@ -188,16 +180,10 @@ for target in targets:
|
|||||||
|
|
||||||
for device in available_targets[target]['devices']:
|
for device in available_targets[target]['devices']:
|
||||||
# The rule for building a .bc file for the specified architecture using clang.
|
# The rule for building a .bc file for the specified architecture using clang.
|
||||||
device_def_list = (device['defines']['all'] if 'all' in device['defines'] else []);
|
|
||||||
if llvm_string_version in device['defines']:
|
|
||||||
device_def_list += (device['defines'][llvm_string_version]);
|
|
||||||
device_defines = ' '.join(["-D%s" % define for define in device_def_list])
|
|
||||||
clang_bc_flags = "-target %s -I`dirname $in` %s " \
|
clang_bc_flags = "-target %s -I`dirname $in` %s " \
|
||||||
"-fno-builtin " \
|
"-fno-builtin " \
|
||||||
"-Dcl_clang_storage_class_specifiers " \
|
|
||||||
"%s " \
|
|
||||||
"-D__CLC_INTERNAL " \
|
"-D__CLC_INTERNAL " \
|
||||||
"-emit-llvm" % (target, clang_cl_includes, device_defines)
|
"-emit-llvm" % (target, clang_cl_includes)
|
||||||
if device['gpu'] != '':
|
if device['gpu'] != '':
|
||||||
clang_bc_flags += ' -mcpu=' + device['gpu']
|
clang_bc_flags += ' -mcpu=' + device['gpu']
|
||||||
clang_bc_rule = "CLANG_CL_BC_" + target + "_" + device['gpu']
|
clang_bc_rule = "CLANG_CL_BC_" + target + "_" + device['gpu']
|
||||||
|
Loading…
Reference in New Issue
Block a user