diff options
Diffstat (limited to 'third_party/bazel/rules_haskell/tests/indirect-link/cbits')
-rw-r--r-- | third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c | 9 | ||||
-rw-r--r-- | third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c | 10 |
2 files changed, 19 insertions, 0 deletions
diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c new file mode 100644 index 000000000000..666ce43962a3 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/impl.c @@ -0,0 +1,9 @@ +static int thing; + +int real_get_thing(void) { + return thing; +} + +void real_set_thing(int value) { + thing = value; +} diff --git a/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c new file mode 100644 index 000000000000..f7a8f5e9f2e8 --- /dev/null +++ b/third_party/bazel/rules_haskell/tests/indirect-link/cbits/intf.c @@ -0,0 +1,10 @@ +extern int real_get_thing(void); +extern void real_set_thing(int value); + +int get_thing(void) { + return real_get_thing(); +} + +void set_thing(int value) { + real_set_thing(value); +} |