MCP #705: Provide the option -Csymbol-mangling-version=hashed -Z unstable-options to shorten symbol names by replacing them with a digest.
Enrich test cases
This commit is contained in:
@@ -407,7 +407,8 @@ mod desc {
|
||||
pub const parse_switch_with_opt_path: &str =
|
||||
"an optional path to the profiling data output directory";
|
||||
pub const parse_merge_functions: &str = "one of: `disabled`, `trampolines`, or `aliases`";
|
||||
pub const parse_symbol_mangling_version: &str = "either `legacy` or `v0` (RFC 2603)";
|
||||
pub const parse_symbol_mangling_version: &str =
|
||||
"one of: `legacy`, `v0` (RFC 2603), or `hashed`";
|
||||
pub const parse_src_file_hash: &str = "either `md5` or `sha1`";
|
||||
pub const parse_relocation_model: &str =
|
||||
"one of supported relocation models (`rustc --print relocation-models`)";
|
||||
@@ -1180,6 +1181,7 @@ mod parse {
|
||||
*slot = match v {
|
||||
Some("legacy") => Some(SymbolManglingVersion::Legacy),
|
||||
Some("v0") => Some(SymbolManglingVersion::V0),
|
||||
Some("hashed") => Some(SymbolManglingVersion::Hashed),
|
||||
_ => return false,
|
||||
};
|
||||
true
|
||||
@@ -1504,7 +1506,7 @@ options! {
|
||||
"tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)"),
|
||||
symbol_mangling_version: Option<SymbolManglingVersion> = (None,
|
||||
parse_symbol_mangling_version, [TRACKED],
|
||||
"which mangling version to use for symbol names ('legacy' (default) or 'v0')"),
|
||||
"which mangling version to use for symbol names ('legacy' (default), 'v0', or 'hashed')"),
|
||||
target_cpu: Option<String> = (None, parse_opt_string, [TRACKED],
|
||||
"select target processor (`rustc --print target-cpus` for details)"),
|
||||
target_feature: String = (String::new(), parse_target_feature, [TRACKED],
|
||||
|
||||
Reference in New Issue
Block a user