[PATCH] D92575: [mac/lld] Run tests with -fatal_warnings by default
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 3 06:38:11 PST 2020
thakis created this revision.
thakis added a reviewer: lld-macho.
thakis requested review of this revision.
This helps us catch cases where we add support for a flag but forget to
remove HelpHidden from Options.td.
More explicit alternative to D92455 <https://reviews.llvm.org/D92455>
https://reviews.llvm.org/D92575
Files:
lld/test/MachO/fatal-warnings.s
lld/test/MachO/lit.local.cfg
Index: lld/test/MachO/lit.local.cfg
===================================================================
--- lld/test/MachO/lit.local.cfg
+++ lld/test/MachO/lit.local.cfg
@@ -2,5 +2,7 @@
import os
-config.substitutions.append(('%lld', 'lld -flavor darwinnew -syslibroot ' +
- os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk")))
+lld = ('lld -flavor darwinnew -syslibroot ' +
+ os.path.join(config.test_source_root, "MachO", "Inputs", "MacOSX.sdk"))
+config.substitutions.append(('%lld', lld + ' -fatal_warnings'))
+config.substitutions.append(('%no_fatal_warnings_lld', lld))
Index: lld/test/MachO/fatal-warnings.s
===================================================================
--- lld/test/MachO/fatal-warnings.s
+++ lld/test/MachO/fatal-warnings.s
@@ -1,10 +1,10 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t1.o
-# RUN: %lld %t1.o -o /dev/null -single_module 2>&1 \
+# RUN: %no_fatal_warnings_lld %t1.o -o /dev/null -single_module 2>&1 \
# RUN: | FileCheck -check-prefix=WARNING %s
-# RUN: not %lld %t1.o -fatal_warnings -o /dev/null -single_module 2>&1 \
-# RUN: | FileCheck -check-prefix=ERROR %s
+# RUN: not %no_fatal_warnings_lld %t1.o -fatal_warnings -o /dev/null \
+# RUN: -single_module 2>&1 | FileCheck -check-prefix=ERROR %s
# ERROR: error: Option `-single_module' is deprecated
# WARNING: warning: Option `-single_module' is deprecated
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92575.309245.patch
Type: text/x-patch
Size: 1442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/06de2a00/attachment.bin>
More information about the llvm-commits
mailing list