Skip to content

Commit 430c42a

Browse files
authored
[release/7.0-rc1][mini] double quote linker path in defined(LD_NAME) case (#74453)
* [mini] double quote linker path in defined(LD_NAME) case In e71a958 we started setting a default `LD_NAME` for x86 non-mach targets Fixes Android x86 builds that specify a `tool_prefix` with spaces in it * also add an "llvm_only" branch to the defined(LD_NAME) case
1 parent 1356e44 commit 430c42a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mono/mono/mini/aot-compiler.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12737,7 +12737,12 @@ compile_asm (MonoAotCompile *acfg)
1273712737
if (ld_binary_name == NULL) {
1273812738
ld_binary_name = LD_NAME;
1273912739
}
12740-
g_string_append_printf (str, "%s%s %s", tool_prefix, ld_binary_name, LD_OPTIONS);
12740+
if (acfg->aot_opts.tool_prefix)
12741+
g_string_append_printf (str, "\"%s%s\" %s", tool_prefix, ld_binary_name, LD_OPTIONS);
12742+
else if (acfg->aot_opts.llvm_only)
12743+
g_string_append_printf (str, "%s", acfg->aot_opts.clangxx);
12744+
else
12745+
g_string_append_printf (str, "\"%s%s\" %s", tool_prefix, ld_binary_name, LD_OPTIONS);
1274112746
#else
1274212747
if (ld_binary_name == NULL) {
1274312748
ld_binary_name = "ld";

0 commit comments

Comments
 (0)