aboutsummaryrefslogtreecommitdiff
path: root/manual tests
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-05-21 21:46:03 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-05-21 21:46:03 +0300
commitafe7252476290ffb6d26a21bf4ceab9eecc7ca79 (patch)
tree90001f70c4a02e968ae3fde1e841d58531d97dcc /manual tests
parent695aa0b8c28a0069d0e999aa039a60951b440ea4 (diff)
downloadmeson-afe7252476290ffb6d26a21bf4ceab9eecc7ca79.zip
meson-afe7252476290ffb6d26a21bf4ceab9eecc7ca79.tar.gz
meson-afe7252476290ffb6d26a21bf4ceab9eecc7ca79.tar.bz2
Can specify a stdlib subproject that is used implicitly on all targets with said language.
Diffstat (limited to 'manual tests')
-rw-r--r--manual tests/9 nostdlib/meson.build12
-rw-r--r--manual tests/9 nostdlib/subprojects/mylibc/meson.build5
2 files changed, 6 insertions, 11 deletions
diff --git a/manual tests/9 nostdlib/meson.build b/manual tests/9 nostdlib/meson.build
index ad5b7b9..3ef743e 100644
--- a/manual tests/9 nostdlib/meson.build
+++ b/manual tests/9 nostdlib/meson.build
@@ -2,13 +2,9 @@ project('own libc', 'c')
# A simple project that uses its own libc.
-libc_proj = subproject('mylibc')
-libc_dep = libc_proj.get_variable('mylibc_dep')
-
-exe = executable('selfcontained', 'prog.c',
- c_args : '-nostdlib',
- link_args : '-nostdlib',
- dependencies : libc_dep,
-)
+# Note that we don't need to specify anything, the flags to use
+# stdlib come from the cross file.
+
+exe = executable('selfcontained', 'prog.c')
test('standalone test', exe)
diff --git a/manual tests/9 nostdlib/subprojects/mylibc/meson.build b/manual tests/9 nostdlib/subprojects/mylibc/meson.build
index 9d1fed8..aa0184e 100644
--- a/manual tests/9 nostdlib/subprojects/mylibc/meson.build
+++ b/manual tests/9 nostdlib/subprojects/mylibc/meson.build
@@ -2,10 +2,9 @@ project('own libc', 'c')
# A very simple libc implementation
-# Start with manual flags to compile, then add platform support.
+# Do not specify -nostdlib & co. They come from cross specifications.
-libc = static_library('c', 'libc.c', 'stubstart.s',
-)
+libc = static_library('c', 'libc.c', 'stubstart.s')
mylibc_dep = declare_dependency(link_with : libc,
include_directories : include_directories('.')