forked from OSchip/llvm-project
[lld-macho] Downgrade version mismatch to warning
It's a warning in ld64. While having LLD be stricter would be nice, it makes it harder for it to be a drop-in replacement into existing builds. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D104333
This commit is contained in:
parent
2a936be388
commit
d52d1b93c3
|
@ -178,13 +178,12 @@ static bool checkCompatibility(const InputFile *input) {
|
|||
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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue