This has mostly the same effect as https://reviews.llvm.org/D65108 but has a more localized implementation that duplicates more code.
This approach also doesn't validate flags for the integrated assembler if the assembler step doesn't run.
Differential D65233
driver: Don't warn about assembler flags being unused when not assembling; different approach thakis on Jul 24 2019, 10:58 AM. Authored by
Details This has mostly the same effect as https://reviews.llvm.org/D65108 but has a more localized implementation that duplicates more code. This approach also doesn't validate flags for the integrated assembler if the assembler step doesn't run.
Diff Detail
Event TimelineComment Actions lgtm
Comment Actions We see test failures in as-options.s: ******************** TEST 'Clang :: Driver/as-options.s' FAILED ******************** Script: -- : 'RUN: at line 3'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target x86_64-linux-gnu -c -no-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 7'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target x86_64-linux-gnu -c -no-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -I foo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 11'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target x86_64-linux-gnu -c -integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 15'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target x86_64-linux-gnu -c -integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -I foo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 21'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target aarch64-linux-gnu -c -no-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 25'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target aarch64-linux-gnu -c -integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 29'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target armv7-linux-gnueabihf -c -no-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 33'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -target armv7-linux-gnueabihf -c -integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -Ifoo_dir -### 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 42'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mincremental-linker-compatible -E -o /dev/null -x c++ /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 45'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mincremental-linker-compatible -E -o /dev/null -x assembler-with-cpp /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 48'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mimplicit-it=always -target armv7-linux-gnueabi -E -o /dev/null -x c++ /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 51'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mimplicit-it=always -target armv7-linux-gnueabi -E -o /dev/null -x assembler-with-cpp /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 54'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Wa,-mbig-obj -target i386-pc-windows -E -o /dev/null -x c++ /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 57'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Wa,-mbig-obj -target i386-pc-windows -E -o /dev/null -x assembler-with-cpp /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 60'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Xassembler -mbig-obj -target i386-pc-windows -E -o /dev/null -x c++ /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 63'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Xassembler -mbig-obj -target i386-pc-windows -E -o /dev/null -x assembler-with-cpp /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 70'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Wa,-mno-warn-deprecated -fno-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -S 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOERROR --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 76'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -Wa,-mno-warn-deprecated -fno-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -S 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 81'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mrelax-all -fintegrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -S 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=NOWARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s : 'RUN: at line 83'; /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/clang -mrelax-all -fno-integrated-as /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -S 2>&1 | /b/s/w/ir/k/recipe_cleanup/clangrtoFQg/llvm_build_dir/bin/FileCheck --check-prefix=WARN --allow-empty /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s -- Exit Code: 1 Command Output (stderr): -- /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s:66:16: error: NOWARN-NOT: excluded string found in input // NOWARN-NOT: unused ^ <stdin>:1:95: note: found here clang-10: warning: /b/s/w/ir/k/llvm-project/clang/test/Driver/as-options.s: 'assembler' input unused [-Wunused-command-line-argument] ^~~~~~ --- Comment Actions It's our toolchain linux-x86 builder, see https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-x64-linux/b8906751725919481408, mac-x86 has been working fine. No, it's still failing with the same error, see https://luci-milo.appspot.com/p/fuchsia/g/clang/console. Comment Actions I made another fixup (similar to https://reviews.llvm.org/rL367176) here https://reviews.llvm.org/rL367182. Can someone please take a look (a post-commit review) of https://reviews.llvm.org/rL367182 to verify that I did not misunderstand the intention with the test somehow? Comment Actions Nice to know that I did not mess up the test in my attempt to silence the buildbots. So thanks for taking a look. |