diff options
Diffstat (limited to 'test cases/unit/55 dedup compiler libs/liba')
-rw-r--r-- | test cases/unit/55 dedup compiler libs/liba/liba.c | 18 | ||||
-rw-r--r-- | test cases/unit/55 dedup compiler libs/liba/liba.h | 8 | ||||
-rw-r--r-- | test cases/unit/55 dedup compiler libs/liba/meson.build | 8 |
3 files changed, 34 insertions, 0 deletions
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) |