[PATCH] D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Feb 27 19:49:57 PST 2022


jrtc27 added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:764
     CmdArgs.push_back(MArchName.data());
+    if (Args.hasArg(options::OPT_mno_relax))
+      CmdArgs.push_back("-mno-relax");
----------------
I doubt this does the right thing for `-mrelax -mno-relax`? I imagine you want Args.hasFlag.


================
Comment at: clang/test/Driver/riscv-gnutools.c:19
 
+// Check default when -mno-relax and -fno-integrated-as specified
+// RUN: %clang -target riscv32 --gcc-toolchain=%S/Inputs/basic_riscv32_tree -mno-relax -fno-integrated-as %s -### -c \
----------------
All of these tests are using -fno-integrated-as, calling it out specifically for this one is misleading


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120639/new/

https://reviews.llvm.org/D120639



More information about the cfe-commits mailing list