fixes #25338; Switch default mangling back to cpp (#25343)

fixes #25338
This commit is contained in:
ringabout
2025-12-09 14:16:08 +08:00
committed by GitHub
parent fa4d79f519
commit ed8e5a7754
5 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -512,7 +512,7 @@ const
optHints, optStackTrace, optLineTrace, # consider adding `optStackTraceMsgs`
optTrMacros, optStyleCheck, optCursorInference}
DefaultGlobalOptions* = {optThreadAnalysis, optExcessiveStackTrace,
optJsBigInt64}
optJsBigInt64, optItaniumMangle}
proc getSrcTimestamp(): DateTime =
try:

View File

@@ -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

View File

@@ -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'"

View File

@@ -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'"