[PATCH] D101855: [lld-macho] Check simulator platforms to avoid issuing false positive errors.
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 11:18:57 PDT 2021
int3 accepted this revision.
int3 added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lld/MachO/InputFiles.cpp:162-163
+ if (config->platform() != platformInfo->target.Platform &&
+ !checkSimulatedPlatform(config->platform(),
+ platformInfo->target.Platform)) {
error(toString(input) + " has platform " +
----------------
how about having a function that just canonicalizes the platform name, removing the simulator part? i.e. something like
`removeSimulator(config->platform()) != removeSimulator(platformInfo->target.Platform)`
pros: the map will only need half the entries, plus it's a bit more symmetric
either is fine though
================
Comment at: lld/test/MachO/invalid/incompatible-arch.s:37-38
+
+# RUN: %lld -dylib -platform_version ios-simulator 10.15.0 10.15.0 %t/test_x86_ios.o
+# RUN: %lld -dylib -platform_version ios 10.15.0 10.15.0 %t/test_x86_ios_sim.o
+
----------------
for clarity
================
Comment at: lld/test/MachO/invalid/incompatible-arch.s:45
+# RUN: -o /dev/null 2>&1 | FileCheck %s --check-prefix=CROSS-SIM2
+# CROSS-SIM2: {{.*}}test_x86_ios_sim.o has platform iOS, which is different from target platform watchOS Simulator
+
----------------
why doesn't this say "iOS simulator"?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101855/new/
https://reviews.llvm.org/D101855
More information about the llvm-commits
mailing list