Skip to content

Commit 9d5f62e

Browse files
modified ppc64le meson build
1 parent f8ee739 commit 9d5f62e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

meson_cpu/ppc64/meson.build

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
source_root = meson.project_source_root()
22
mod_features = import('features')
3-
compiler_id = meson.get_compiler('c').get_id()
3+
cc = meson.get_compiler('c')
4+
cxx = meson.get_compiler('cpp')
5+
compiler_id = cc.get_id()
46

57
VSX = mod_features.new(
68
'VSX', 1, args: '-mvsx',
@@ -12,6 +14,18 @@ VSX = mod_features.new(
1214
if compiler_id == 'clang'
1315
VSX.update(args: ['-mvsx', '-maltivec'])
1416
endif
17+
18+
vec_args = []
19+
if cc.has_argument('-mpower9-vector') and cxx.has_argument('-mpower9-vector')
20+
vec_args += ['-mpower9-vector']
21+
endif
22+
if cc.has_argument('-mpower10-vector') and cxx.has_argument('-mpower10-vector')
23+
vec_args += ['-mpower10-vector']
24+
endif
25+
if vec_args.length() > 0
26+
add_project_arguments(vec_args, language: ['c', 'cpp'])
27+
endif
28+
1529
VSX2 = mod_features.new(
1630
'VSX2', 2, implies: VSX, args: {'val': '-mcpu=power8', 'match': '.*vsx'},
1731
detect: {'val': 'VSX2', 'match': 'VSX'},

0 commit comments

Comments
 (0)