diff --git a/changelog.md b/changelog.md index bf7d343d1b..b0bd39ddb7 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`. ## Standard library additions and changes diff --git a/compiler/options.nim b/compiler/options.nim index 80b6cd729c..479148d07c 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -512,7 +512,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 85da350a80..4f0c664acf 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -91,7 +91,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'" diff --git a/tests/codegen/titaniummangle_nim.nim b/tests/codegen/titaniummangle_nim.nim index 72afdaf8a6..204d6ac063 100644 --- a/tests/codegen/titaniummangle_nim.nim +++ b/tests/codegen/titaniummangle_nim.nim @@ -1,6 +1,6 @@ discard """ targets: "c" - matrix: "--debugger:native --mangle:nim; --debugger:native" + matrix: "--debugger:native --mangle:nim" ccodecheck: "'testFunc__titaniummangle95nim_u1316'" ccodecheck: "'testFunc__titaniummangle95nim_u156'" ccodecheck: "'testFunc__titaniummangle95nim_u1305'"