[PATCH] D84219: [gn build] mac: use frameworks instead of libs where appropriate
Mark Mentovai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 14:48:40 PDT 2020
markmentovai updated this revision to Diff 283740.
markmentovai added a comment.
Add assertion as discussed
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84219/new/
https://reviews.llvm.org/D84219
Files:
llvm/utils/gn/build/toolchain/BUILD.gn
Index: llvm/utils/gn/build/toolchain/BUILD.gn
===================================================================
--- llvm/utils/gn/build/toolchain/BUILD.gn
+++ llvm/utils/gn/build/toolchain/BUILD.gn
@@ -70,6 +70,23 @@
default_output_dir = "{{root_out_dir}}/lib"
}
+ if (current_os == "mac") {
+ # gn < 1693 (e214b5d35898) doesn't support |frameworks|, requiring
+ # frameworks to be listed in |libs|, but gn >= 1808 (3028c6a426a4) forbids
+ # frameworks from appearing in |libs|. This assertion provides a helpful
+ # cue to upgrade, and is much more user-friendly than the failure that
+ # occurs when an older gn encounters |frameworks|.
+ #
+ # gn_version doesn’t actually exist in gn < 1709 (52cb644a3fb4), and
+ # defined(gn_version) doesn't actually work as expected
+ # (https://crbug.com/gn/183), so 1709 is the true minimum enforced by
+ # this construct, and if gn_version is not available, this line will still
+ # be blamed, making the resolution somewhat discoverable.
+ assert(gn_version >= 1693,
+ "Your GN is too old! " +
+ "Update it, perhaps by running llvm/utils/gn/get.py")
+ }
+
tool("solink") {
outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
if (current_os == "mac") {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84219.283740.patch
Type: text/x-patch
Size: 1344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200806/6e52c6fb/attachment.bin>
More information about the llvm-commits
mailing list