[PATCH] D104333: [lld-macho] Downgrade version mismatch to warning
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 15 21:53:46 PDT 2021
int3 updated this revision to Diff 352334.
int3 added a comment.
update test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104333/new/
https://reviews.llvm.org/D104333
Files:
lld/MachO/InputFiles.cpp
lld/test/MachO/invalid/incompatible-arch.s
Index: lld/test/MachO/invalid/incompatible-arch.s
===================================================================
--- lld/test/MachO/invalid/incompatible-arch.s
+++ lld/test/MachO/invalid/incompatible-arch.s
@@ -14,9 +14,9 @@
# RUN: %lld -lSystem -dylib -arch arm64 -platform_version macOS 10.14.0 10.15.0 %t/out.dylib -o /dev/null
-# RUN: not %lld -lSystem -dylib -arch arm64 -platform_version macOS 10.13.0 10.15.0 %t/out.dylib \
+# RUN: %no_fatal_warnings_lld -lSystem -dylib -arch arm64 -platform_version macOS 10.13.0 10.15.0 %t/out.dylib \
# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=DYLIB-VERSION
-# DYLIB-VERSION: {{.*}}out.dylib has version 10.14.0, which is newer than target minimum of 10.13.0
+# DYLIB-VERSION: warning: {{.*}}out.dylib has version 10.14.0, which is newer than target minimum of 10.13.0
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos10.15.0 %s -o %t/test_x86.o
@@ -26,9 +26,9 @@
# RUN: %lld %t/test_x86.o -lSystem -arch x86_64 -platform_version macOS 10.15.0 10.15.0 -o /dev/null
-# RUN: not %lld %t/test_x86.o -lSystem -arch x86_64 -platform_version macOS 10.14.0 10.15.0 \
+# RUN: %no_fatal_warnings_lld %t/test_x86.o -lSystem -arch x86_64 -platform_version macOS 10.14.0 10.15.0 \
# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=OBJ-VERSION
-# OBJ-VERSION: {{.*}}test_x86.o has version 10.15.0, which is newer than target minimum of 10.14.0
+# OBJ-VERSION: warning: {{.*}}test_x86.o has version 10.15.0, which is newer than target minimum of 10.14.0
## Test that simulators platforms are compat with their simulatees.
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-ios14.0 %s -o %t/test_x86_ios.o
Index: lld/MachO/InputFiles.cpp
===================================================================
--- lld/MachO/InputFiles.cpp
+++ lld/MachO/InputFiles.cpp
@@ -178,13 +178,12 @@
return false;
}
- if (it->minimum <= config->platformInfo.minimum)
- return true;
+ if (it->minimum > config->platformInfo.minimum)
+ warn(toString(input) + " has version " + it->minimum.getAsString() +
+ ", which is newer than target minimum of " +
+ config->platformInfo.minimum.getAsString());
- error(toString(input) + " has version " + it->minimum.getAsString() +
- ", which is newer than target minimum of " +
- config->platformInfo.minimum.getAsString());
- return false;
+ return true;
}
// Open a given file path and return it as a memory-mapped file.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104333.352334.patch
Type: text/x-patch
Size: 2485 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210616/52595243/attachment.bin>
More information about the llvm-commits
mailing list