[PATCH] D124106: [lld/mac] Warn that writing zippered outputs isn't implemented

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 21 08:51:35 PDT 2022


thakis marked an inline comment as done.
thakis added a comment.

Thanks!



================
Comment at: lld/MachO/Driver.cpp:641-651
+  if (platformVersions.size() > 2) {
+    error("must specify -platform_version at most twice");
+    return PLATFORM_UNKNOWN;
+  }
+  if (platformVersions.size() > 1) {
+    // FIXME: If you implement support for this, add a diagnostic if
+    // outputType is not dylib or bundle -- linkers shouldn't be able to
----------------
int3 wrote:
> cover these with a test?
Sure, will do.


================
Comment at: lld/MachO/Driver.cpp:649-650
+    // write zippered executables.
+    warn("writing zippered outputs not yet implemented, "
+         "ignoring all but last -platform_version flag");
+  }
----------------
oontvoo wrote:
> Should we verify that this is indeed because of the zippered dylib expansion of arguments?
> (This is now assuming that whenever two or more platform_version arguments are passed, it is because of the zippered dylib, but that might not always be the case, eg. users accidentally pass the args multiple times)
> Warning "writing zippered outputs..." here would be a bit confusing.
> 
> 
How would you verify this? If users typo this, they _will_ get zippered output once we implement support for that (and they do get that with ld64).

(If more more than 2 platform_version args are passed, they'll get the "must specify -platform_version at most twice" diag further up.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124106/new/

https://reviews.llvm.org/D124106



More information about the llvm-commits mailing list