From 7b6e527f440cd7e6f8be2b07cee320ee6ca18786 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 29 Apr 2024 06:41:38 +0200 Subject: Adding upstream version 1.0.1. Signed-off-by: Daniel Baumann --- test cases/unit/55 dedup compiler libs/liba/liba.c | 18 ++++++++++++++++++ test cases/unit/55 dedup compiler libs/liba/liba.h | 8 ++++++++ .../unit/55 dedup compiler libs/liba/meson.build | 8 ++++++++ 3 files changed, 34 insertions(+) create mode 100644 test cases/unit/55 dedup compiler libs/liba/liba.c create mode 100644 test cases/unit/55 dedup compiler libs/liba/liba.h create mode 100644 test cases/unit/55 dedup compiler libs/liba/meson.build (limited to 'test cases/unit/55 dedup compiler libs/liba') diff --git a/test cases/unit/55 dedup compiler libs/liba/liba.c b/test cases/unit/55 dedup compiler libs/liba/liba.c new file mode 100644 index 0000000..962d47f --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/liba.c @@ -0,0 +1,18 @@ +#include "liba.h" + +static int val; + +void liba_add(int x) +{ + val += x; +} + +void liba_sub(int x) +{ + val -= x; +} + +int liba_get(void) +{ + return val; +} diff --git a/test cases/unit/55 dedup compiler libs/liba/liba.h b/test cases/unit/55 dedup compiler libs/liba/liba.h new file mode 100644 index 0000000..a980cdc --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/liba.h @@ -0,0 +1,8 @@ +#ifndef LIBA_H_ +#define LIBA_H_ + +void liba_add(int x); +void liba_sub(int x); +int liba_get(void); + +#endif diff --git a/test cases/unit/55 dedup compiler libs/liba/meson.build b/test cases/unit/55 dedup compiler libs/liba/meson.build new file mode 100644 index 0000000..eccfa46 --- /dev/null +++ b/test cases/unit/55 dedup compiler libs/liba/meson.build @@ -0,0 +1,8 @@ +deps = [dependency('threads'), cc.find_library('dl'), cc.find_library('m')] + +liba = library('a', 'liba.c', + dependencies: deps) + +liba_dep = declare_dependency(link_with: liba, + include_directories: include_directories('.'), + dependencies: deps) -- cgit v1.2.3