arichardson added inline comments.
================ Comment at: clang/lib/Driver/ToolChains/RISCVToolchain.cpp:54 + + // Set alias for "riscv{64|32}-unknown-unknown-elf" + SmallVector<std::string, 1> TripleAliases; ---------------- anton-afanasyev wrote: > arichardson wrote: > > This seems like the wrong place to add this workaround, shouldn't the > > change be in `GCCInstallation::init`? That way targets other than RISC-V > > also benefit from this fix. > > > `GCCInstallation` knows nothing about triple equivalence of the specific > targets, but provides `TripleAliases` init variable for installation target > callers. Other targets are to do the same initialization as we do here in > case of different normalized and layout-used triple names. What I was trying to say is that the normalization adding `-unknown` affects all targets, so maybe `GCCInstallation::init()` should add aliases that have the `-unknown` components removed rather than doing this at the call site. This way the alias computation does not need to be moved to each target info. However, I also think we should be passing through the triple as passed to --target= rather than the normalized triple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128625/new/ https://reviews.llvm.org/D128625 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits