[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 14:25:17 PDT 2020


phosek added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4642
+    int Num;
+    if (V == "future")
+      A->render(Args, CmdArgs);
----------------
Another option would be `unstable`.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:738
 
-  if (!getContext().getAsmInfo()->useIntegratedAssembler()) {
-    // If we are not using the integrated assembler then this symbol might have
+  if (!getContext().getAsmInfo()->useIntegratedASOrGAS(2, 35)) {
+    // If we are using GNU as before 2.35, then this symbol might have
----------------
I'd prefer to spell it out in full, i.e. `getContext().getAsmInfo()->useIntegratedAssembler() || !getContext().getAsmInfo()->binutilsVersion(2, 35)`, it's more verbose but it's cleaner to me what it does just when looking at this line alone.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85474



More information about the llvm-commits mailing list