<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 22, 2015, at 12:56 PM, Sean Silva <<a href="mailto:chisophugis@gmail.com" class="">chisophugis@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Wed, Jul 22, 2015 at 10:29 AM, Richard Smith<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:metafoo@gmail.com" target="_blank" class="">metafoo@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><span class=""><p dir="ltr" class="">On 21 Jul 2015 8:25 pm, "Ben Langmuir" <<a href="mailto:blangmuir@apple.com" target="_blank" class="">blangmuir@apple.com</a>> wrote:<br class="">><br class="">> Hi all,<br class="">><br class="">> While reviewing<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10423&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=euaRAqHkjwRnxEpB6dyNCcGfP3ytr5Sqb59IHcX9NzA&s=qc0NNDVsMdVXF1LiJA_kA3FqZ5IbADC0NxSSu_9LXYs&e=" target="_blank" class="">http://reviews.llvm.org/D10423</a>, I ran into a problem with our _Builtin_Intrinsics module map file.  It contains a submodule for arm intrinsics:<br class="">><br class="">>   explicit module arm {<br class="">>     requires arm<br class="">><br class="">> This doesn’t work as intended, because today only 32bit arm targets publish the “arm” target feature, but this module is supposed to be used on AArch64 as well (e.g. for the arm_neon.h header).  The target features that we can use in a module “requires” declaration are controlled by TargetInfo::hasFeature().  Only module map parsing currently checks for the arm feature.<br class="">><br class="">> I propose that we rename the current “arm” feature to “arm32” and take over the name “arm” to mean “arm32 || aarch64”.<br class="">><br class="">> Pros<br class="">> * Mirrors the x86/x86_32/x86_64 feature names and functionality<br class="">> * Anecdotally, this better matches user expectation of what “requires arm” means<br class="">><br class="">> Cons<br class="">> * This is a backwards-incompatible change if any modules rely on “requires arm” failing on aarch64 targets.<br class="">><br class="">> Would this break existing modules for anyone who cannot just add a “requires !aarch64” to their module map? Or does anyone feel strongly that this is the wrong solution?</p></span><p dir="ltr" class="">I agree that this is the right solution, assuming it doesn't break anyone.</p></blockquote><div class="">Agreed. Realistically I don't expect anybody besides Apple to be shipping modules in a situation where ambiguity with aarch64 could be an issue, so the breakage (if any) should hopefully be limited to apple systems Ben can test.</div></div></div></blockquote><div><br class=""></div><div>The Darwin SDKs don’t use the “arm” requirement anywhere.  The only case I’ve come across at all is the one in the clang builtin modules.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 14px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""><br class=""></div><div class="">-- Sean Silva </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="HOEnZb"><div class="h5"><p dir="ltr" class="">> The other possibilities I considered, but felt were worse solutions:<br class="">> (a) Keep the meaning of “arm” and invent a new feature to mean "arm || aarch64".  Mostly I felt this left the existing name unnecessarily confusing.<br class="">> (b) accepting the state of the compiler and duplicating the “arm” submodule. In theory, isBetterKnownHeader will allow this to “just work” for #includes, but users would have to spell their @imports differently for different targets, or<br class="">> (c) adding some general feature to spell disjunctions in module requires decls (this didn’t seem worth it since I can’t think of any other users for such a feature).<br class="">><br class="">><br class="">> Ben<br class="">></p></div></div></blockquote></div></div></blockquote></div><br class=""></body></html>