diff --git a/changelog.md b/changelog.md index 4c767fb7c8..8d59320672 100644 --- a/changelog.md +++ b/changelog.md @@ -27,7 +27,7 @@ errors. - With `-d:nimPreviewDuplicateModuleError`, importing two modules that share the same name becomes a compile-time error. This includes importing the same module more than once. Use `import foo as foo1` (or other aliases) to avoid collisions. -- Adds the switch `--mangle:nim|cpp`, which selects `nim` or `cpp` style name mangling when used with `debuginfo` on, defaults to `nim`. The default is changed from `cpp` to `nim`. +- Adds the switch `--mangle:nim|cpp`, which selects `nim` or `cpp` style name mangling when used with `debuginfo` on, defaults to `cpp`. - The second parameter of `succ`, `pred`, `inc`, and `dec` in `system` now accepts `SomeInteger` (previously `Ordinal`). diff --git a/compiler/options.nim b/compiler/options.nim index f25b52051b..23ef201801 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -509,7 +509,7 @@ const optHints, optStackTrace, optLineTrace, # consider adding `optStackTraceMsgs` optTrMacros, optStyleCheck, optCursorInference} DefaultGlobalOptions* = {optThreadAnalysis, optExcessiveStackTrace, - optJsBigInt64} + optJsBigInt64, optItaniumMangle} proc getSrcTimestamp(): DateTime = try: diff --git a/doc/advopt.txt b/doc/advopt.txt index b545a1ab4f..859a775100 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -90,7 +90,7 @@ Advanced options: --os:SYMBOL set the target operating system (cross-compilation) --cpu:SYMBOL set the target processor (cross-compilation) --debuginfo:on|off enables debug information - --mangle:nim|cpp selects `nim` or `cpp` style name mangling, defaults to `nim` + --mangle:nim|cpp selects `nim` or `cpp` style name mangling, defaults to `cpp` -t, --passC:OPTION pass an option to the C compiler -l, --passL:OPTION pass an option to the linker --cc:SYMBOL specify the C compiler diff --git a/tests/codegen/titaniummangle.nim b/tests/codegen/titaniummangle.nim index ccca9ce2f0..7623559a35 100644 --- a/tests/codegen/titaniummangle.nim +++ b/tests/codegen/titaniummangle.nim @@ -1,6 +1,6 @@ discard """ targets: "c cpp" - matrix: "--debugger:native --mangle:cpp" + matrix: "--debugger:native --mangle:cpp; --debugger:native" ccodecheck: "'_ZN14titaniummangle8testFuncE'" ccodecheck: "'_ZN14titaniummangle8testFuncE6stringN14titaniummangle3FooE'" ccodecheck: "'_ZN14titaniummangle8testFuncE3int7varargsI6stringE'"