diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-05-21 21:46:03 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-05-21 21:46:03 +0300 |
commit | afe7252476290ffb6d26a21bf4ceab9eecc7ca79 (patch) | |
tree | 90001f70c4a02e968ae3fde1e841d58531d97dcc /manual tests | |
parent | 695aa0b8c28a0069d0e999aa039a60951b440ea4 (diff) | |
download | meson-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.build | 12 | ||||
-rw-r--r-- | manual tests/9 nostdlib/subprojects/mylibc/meson.build | 5 |
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('.') |