USE_GOLD_LD,
USE_BFD_LD,
USE_LLD_LD,
+ USE_MOLD_LD,
USE_LD_MAX
} selected_linker = USE_DEFAULT_LD;
static const char *const ld_suffixes[USE_LD_MAX] =
PLUGIN_LD_SUFFIX,
"ld.gold",
"ld.bfd",
- "ld.lld"
+ "ld.lld",
+ "ld.mold"
};
static const char *const real_ld_suffix = "real-ld";
static const char *const collect_ld_suffix = "collect-ld";
selected_linker = USE_GOLD_LD;
else if (strcmp (argv[i], "-fuse-ld=lld") == 0)
selected_linker = USE_LLD_LD;
+ else if (strcmp (argv[i], "-fuse-ld=mold") == 0)
+ selected_linker = USE_MOLD_LD;
else if (startswith (argv[i], "-o"))
{
/* Parse the output filename if it's given so that we can make
ld_file_name = 0;
#ifdef DEFAULT_LINKER
if (selected_linker == USE_BFD_LD || selected_linker == USE_GOLD_LD ||
- selected_linker == USE_LLD_LD)
+ selected_linker == USE_LLD_LD || selected_linker == USE_MOLD_LD)
{
char *linker_name;
# ifdef HOST_EXECUTABLE_SUFFIX
else if (!use_collect_ld
&& startswith (arg, "-fuse-ld="))
{
- /* Do not pass -fuse-ld={bfd|gold|lld} to the linker. */
+ /* Do not pass -fuse-ld={bfd|gold|lld|mold} to the linker. */
ld1--;
ld2--;
}
Common Driver Negative(fuse-ld=lld)
Use the lld LLVM linker instead of the default linker.
+fuse-ld=mold
+Common Driver Negative(fuse-ld=mold)
+Use the Modern linker (MOLD) linker instead of the default linker.
+
fuse-linker-plugin
Common Undocumented Var(flag_use_linker_plugin)