Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dosbox-staging/dosbox-staging.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkcgen <kcgen@users.noreply.github.com>2022-08-18 21:19:34 +0300
committerkcgen <1557255+kcgen@users.noreply.github.com>2022-08-19 19:11:38 +0300
commit47d2866d4ff8139a2d234b254d4c56fac8b7513b (patch)
treecf5688addf71b5a0d15b407ada6c6a2cdb6510bc /meson.build
parentf47ae1217ba4678caa72c0a20009c3ac2a389ca4 (diff)
Validate extra link arguments in Meson
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index fc59eaf53..bf9b24258 100644
--- a/meson.build
+++ b/meson.build
@@ -121,6 +121,7 @@ if get_option('autovec_info')
]
endif
+# Allow-list the flags against the compiler, and add them to the project
foreach flag : extra_flags
if cc.has_argument(flag)
add_project_arguments(flag, language: 'c')
@@ -129,6 +130,11 @@ foreach flag : extra_flags
add_project_arguments(flag, language: 'cpp')
endif
endforeach
+foreach flag : extra_link_flags
+ if cxx.has_link_argument(flag)
+ add_project_link_arguments(flag, language: 'cpp')
+ endif
+endforeach
# Gather data to populate config.h
@@ -692,7 +698,6 @@ executable(
'dosbox',
dosbox_sources,
dependencies: internal_deps + third_party_deps,
- link_args: extra_link_flags,
include_directories: incdir,
install: true,
)