[PATCH] D158755: Make "-fno-split-machine-functions" a valid flag for all archs.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 24 14:10:22 PDT 2023


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

With a test nit



================
Comment at: clang/test/Driver/fsplit-machine-functions.c:19
+// RUN: not %clang -### -x cuda -S -nocudainc -nocudalib -fsplit-machine-functions %s 2>&1 | FileCheck %s --check-prefix=ERR2
+// ERR2: clang: error: unsupported option '-fsplit-machine-functions' for target
+
----------------
shenhan wrote:
> MaskRay wrote:
> > We should not test `clang: ` before `error:`. It may be a different string in certain builds where `%clang` is a symlink to a file not named `clang`. This would also fail on Windows. Rule of thumb: don't test the exact string before `error:`
> Acked.
Suggest that we add `-Werror` (`%clang -### -Werror ...`) to additionally test that there is no warning. `-Werror` upgrades warnings to errors, which would cause `-###` to exit with 1. This is a recent change of mine to make `-###` stricter.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158755



More information about the cfe-commits mailing list