已开启
feat: update description of --lto-keep-pkg-visibility #501
wangyang594创建于 5月11日
feat: update description of --lto-keep-pkg-visibility #501
已开启
wangyang594创建于 5月11日
2 个文件变更+12-12
@@ -560,20 +560,20 @@ This option is deprecated and will be removed in a future version. Please use `-
560 560 
561### `--lto-keep-pkg-visibility=<value>`561### `--lto-keep-pkg-visibility=<value>`
562 562 
563-Specifies package names whose symbol visibility is preserved in LTO mode. Symbols from unspecified packages will be hidden, enabling LLVM to perform more aggressive dead code elimination.563+Specifies package names whose symbol visibility is preserved during LTO. Symbols from unspecified packages will be marked as hidden, enabling LLVM to perform more aggressive dead code elimination.
564 564 
565**Parameter Description:**565**Parameter Description:**
566 566 
567- `<value>` is a list of package names, separated by commas567- `<value>` is a list of package names, separated by commas
568- `--lto-keep-pkg-visibility` can be used multiple times, with cumulative effect568- `--lto-keep-pkg-visibility` can be used multiple times, with cumulative effect
569-- `<value>` can be an empty string `""`, which means hiding symbols from all packages569+- `<value>` can be an empty string `""`, which hides symbols from all packages during LTO
570 570 
571**Note:**571**Note:**
572 572 
573-- Only effective when --lto is enabled, otherwise an error will be reported573+- Only effective in LTO mode: `--lto=full` provides ideal results, while `--lto=thin` does not fully guarantee functionality
574-- Cannot be used together with --compile-as-exe, otherwise an error will be reported574+- Cannot be combined with `--compile-as-exe`, otherwise a semantic conflict error will be reported
575-- Only effective when compiling dynamic libraries (--output-type=dylib), otherwise a warning will be issued575+- Only effective when compiling dynamic libraries (`--output-type=dylib`)
576-- Windows and macOS platforms do not support LTO, so this option is ineffective on these platforms576+- Windows and macOS platforms do not support LTO, so this option has no effect on these platforms
577 577 
578**Usage Example:**578**Usage Example:**
579 579 
@@ -550,20 +550,20 @@ cjc --scan-dependency pkgA.cjo
550 550 
551### `--lto-keep-pkg-visibility=<value>`551### `--lto-keep-pkg-visibility=<value>`
552 552 
553-指定 LTO 模式下保持符号可见性的包名。未指定包符号将被隐藏,LLVM 可据此执行更激进的无用代码删除。553+指定 LTO 过程中保持符号可见性的包名。未指定包符号将被标记为隐藏,LLVM 可据此执行更激进的无用代码删除。
554 554 
555**参数说明:**555**参数说明:**
556 556 
557- `<value>` 为包名列表,多个包名用逗号分隔557- `<value>` 为包名列表,多个包名用逗号分隔
558- `--lto-keep-pkg-visibility` 可以被多次使用,效果累加558- `--lto-keep-pkg-visibility` 可以被多次使用,效果累加
559-- `<value>` 可以为空字符串`""`, 表示隐藏所有包的符号559+- `<value>` 可以为空字符串 `""`,表示隐藏 LTO 过程中所有包的符号
560 560 
561**注意:**561**注意:**
562 562 
563-- 仅在开启 `--lto` 时有效,否则将报错563+- 仅在 LTO 模式下生效:`--lto=full` 可达到理想`--lto=thin` 下功能保障不完全
564-- 不能与 `--compile-as-exe` 同时使用否则将报错564+- 若指定包可见的同时也指定了 `--compile-as-exe`,会因语义冲突而报错
565-- 仅在编译动态库(`--output-type=dylib`)时,否则会告警565+- 仅在编译动态库(`--output-type=dylib`)时
566-- Windows 和 macOS 平台不支持 LTO 功能,因此该选项在这些平台无效566+- Windows 和 macOS 平台不支持 LTO 功能,因此该选项在这些平台无效
567 567 
568**使用示例:**568**使用示例:**
569 569