diff options
author | LemonBoy <thatlemon@gmail.com> | 2018-09-19 12:46:50 +0200 |
---|---|---|
committer | LemonBoy <thatlemon@gmail.com> | 2018-09-19 12:46:50 +0200 |
commit | 334032294ffd9549a772312cfe5e776c0b9aa934 (patch) | |
tree | 91988a9ff8995bab0fcdcd6f9382450b699c32a2 /tests/cpp/t9013.nim | |
parent | a892d519a60e08212ea05e99bb9f858e6673ee6b (diff) | |
download | Nim-334032294ffd9549a772312cfe5e776c0b9aa934.tar.gz |
Fix linking issue in cpp codegen
Declare the root symbol only once and have the other modules depending on it emit an `extern` declaration. Fixes #9013
Diffstat (limited to 'tests/cpp/t9013.nim')
-rw-r--r-- | tests/cpp/t9013.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cpp/t9013.nim b/tests/cpp/t9013.nim new file mode 100644 index 000000000..6103cf2e7 --- /dev/null +++ b/tests/cpp/t9013.nim @@ -0,0 +1,9 @@ +discard """ + targets: "cpp" + cmd: "nim $target --debugger:native $options $file" +""" + +# The --debugger switch is needed in order to enable the defined(nimTypeNames) +# code path in hti.nim +import typeinfo +var tt: Any |