================ @@ -1520,10 +1520,14 @@ bool tools::addSanitizerRuntimes(const ToolChain &TC, const ArgList &Args, } bool tools::addXRayRuntime(const ToolChain&TC, const ArgList &Args, ArgStringList &CmdArgs) { - if (Args.hasArg(options::OPT_shared)) - return false; - - if (TC.getXRayArgs().needsXRayRt()) { + if (Args.hasArg(options::OPT_shared)) { + if (TC.getXRayArgs().needsXRayDSORt()) { + CmdArgs.push_back("-whole-archive"); ---------------- androm3da wrote:
Why do we use `-whole-archive` here but `--whole-archive` below? Do `ld` and `ld-alikes` all accept both? Probably makes more sense to have `--whole-archive` here. (same goes for `-no-whole-archive` below) https://github.com/llvm/llvm-project/pull/90959 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits