summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-24 21:03:35 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-25 08:49:16 -0400
commit6e2afb1cab76ef31a31c7e4123b9d8ec34a3e824 (patch)
tree81650e2a2f2f2a90004d6d18eb6ff40029c8b7f8 /tools
parentb884196cc1565eaf1b97141fbfa0667ee348e463 (diff)
downloadsystemd-6e2afb1cab76ef31a31c7e4123b9d8ec34a3e824.tar.gz
systemd-6e2afb1cab76ef31a31c7e4123b9d8ec34a3e824.tar.bz2
systemd-6e2afb1cab76ef31a31c7e4123b9d8ec34a3e824.zip
meson: fix checking of linker args
Previous checks did nothing, because cc.has_argument only does compilation, without any linking. Unfortunately cc.links() cannot be used, because it does not accept any options. Providing the test file as a static source is easiest, even if not every elegant. https://github.com/mesonbuild/meson/issues/1676
Diffstat (limited to 'tools')
-rwxr-xr-xtools/meson-check-compilation.sh2
-rw-r--r--tools/meson-link-test.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/meson-check-compilation.sh b/tools/meson-check-compilation.sh
index e24194247e..d3b2a312fd 100755
--- a/tools/meson-check-compilation.sh
+++ b/tools/meson-check-compilation.sh
@@ -1,3 +1,3 @@
#!/bin/sh -eu
-"$@" '-' '-c' -o/dev/null </dev/null
+"$@" '-' -o/dev/null </dev/null
diff --git a/tools/meson-link-test.c b/tools/meson-link-test.c
new file mode 100644
index 0000000000..825bbff05f
--- /dev/null
+++ b/tools/meson-link-test.c
@@ -0,0 +1 @@
+int main(void) {return 0;}