diff options
| author | ruki <[email protected]> | 2021-02-14 12:09:58 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-02-14 12:09:58 +0800 |
| commit | 916228567b6892afe7486bef61b12e409670a208 (patch) | |
| tree | 3bbb85dcf40814d1e7cda95681060996b9b2b54d /tests/projects | |
| parent | f79c7540d17ad3cef4e197fd8c03ec5a1aecb30d (diff) | |
improve muslcc toolchain test
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/src/main.c | 9 | ||||
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/test.lua | 2 | ||||
| -rw-r--r-- | tests/projects/package/toolchain_muslcc/xmake.lua | 11 |
3 files changed, 18 insertions, 4 deletions
diff --git a/tests/projects/package/toolchain_muslcc/src/main.c b/tests/projects/package/toolchain_muslcc/src/main.c index c622f3e45..6331557e6 100644 --- a/tests/projects/package/toolchain_muslcc/src/main.c +++ b/tests/projects/package/toolchain_muslcc/src/main.c @@ -1,11 +1,18 @@ #include <stdio.h> +#include <stdint.h> #include <zlib.h> -#include <plist/plist.h> +#include <ogg/ogg.h> +#ifdef HAVE_LIBPLIST +# include <plist/plist.h> +#endif int main(int argc, char** argv) { printf("hello world!\n"); inflate(0, 0); + ogg_sync_init(0); +#ifdef HAVE_LIBPLIST plist_new_dict(); +#endif return 0; } diff --git a/tests/projects/package/toolchain_muslcc/test.lua b/tests/projects/package/toolchain_muslcc/test.lua index 97668c4c7..4964fecaa 100644 --- a/tests/projects/package/toolchain_muslcc/test.lua +++ b/tests/projects/package/toolchain_muslcc/test.lua @@ -7,6 +7,6 @@ function main(t) -- only for x86/x64, because it will take too long time on ci with arm/mips if os.subarch():startswith("x") or os.subarch() == "i386" then --- t:build() + t:build() end end diff --git a/tests/projects/package/toolchain_muslcc/xmake.lua b/tests/projects/package/toolchain_muslcc/xmake.lua index 48c048457..bf5e98e8c 100644 --- a/tests/projects/package/toolchain_muslcc/xmake.lua +++ b/tests/projects/package/toolchain_muslcc/xmake.lua @@ -5,7 +5,11 @@ set_plat("cross") set_arch("arm") -- add library packages -add_requires("zlib", "libplist", {system = false}) +-- for testing zlib/xmake, libplist/autoconf, libogg/cmake +add_requires("zlib", "libogg", {system = false}) +if is_host("macosx", "linux", "bsd") then + add_requires("libplist", {system = false}) +end -- add toolchains package add_requires("muslcc") @@ -16,4 +20,7 @@ set_toolchains("@muslcc") target("test") set_kind("binary") add_files("src/*.c") - add_packages("zlib", "libplist") + add_packages("zlib", "libplist", "libogg") + if has_package("libplist") then + add_defines("HAVE_LIBPLIST") + end |
