Fixes: ld: warning: -no_pie ignored for arm64 (#829)

Fixes: ld: warning: -no_pie ignored for arm64
This commit is contained in:
Andre LaBranche 2022-02-26 04:40:01 -08:00 committed by GitHub
parent df7bbd3b8e
commit 827bb568de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,10 +228,12 @@ else
project_link_args += [ '-mmacosx-version-min=10.9' ]
endif
if not get_option('b_pie') and get_option('workaround_gcc_no_pie') # nice one, meson
if cpp_compiler.get_id() in [ 'clang' ]
project_link_args += [ '-Wl,-no_pie' ]
else
project_link_args += [ '-no-pie' ]
if copt_architecture != 'arm64' # no position independent executable for arm64
if cpp_compiler.get_id() in [ 'clang' ]
project_link_args += [ '-Wl,-no_pie' ]
else
project_link_args += [ '-no-pie' ]
endif
endif
endif
project_c_args += args_ccomp