[PATCH] MC: Don't emit min version directives when -fno-integrated-as is on

David Majnemer david.majnemer at gmail.com
Sat Nov 22 11:38:57 PST 2014


On Sat, Nov 22, 2014 at 11:32 AM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Sat, Nov 22, 2014 at 11:28 AM, David Majnemer <david.majnemer at gmail.com
> > wrote:
>
>> >>! In D6371#7, @dblaikie wrote:
>> >>>! In D6371#6, @majnemer wrote:
>> >>>>! In D6371#4, @dblaikie wrote:
>> >>> I believe we've been trying to avoid special casing the integrated
>> >>> assembler as much as possible (I think Rafael removed many instances
>> of
>> >>> this) - any other signal that would be appropriate to use?
>> >>
>> >> This patch is working around a directive which the cctools assembler
>> does not have.  Asking it to trigger on another condition would essentially
>> be a proxy for "MC is targeting the cctools assembler" anyway.
>> >
>> > Could we do this down in the MCStreamer instead?
>> >
>> > It looks like MCAsmStreamer::EmitVersionMin should just be a no-op,
>> maybe? (or a no-op on Darwin?
>>
>> How would we be able to emit the version information for Darwin if it
>> were a no-op? I might be missing something but it sounds like
>> .ios_version_min and .macosx_version_min would not properly round-trip.
>>
>
> The MCAsmStreamer is for printing textual assembly, as I understand it(?)
> - and it's this case where want to not use these features, yes?
>

We only want to conditionally disable printing the directives.  By default
we infer the version from the triple but it can be explicitly overridden
using the directives.  If we were to not print them out in the assembly
stream then we would have trouble if we took a clang -S invocation at T1
and assembled it at some later point at T2.


>
> The MCObjectStreamer is the integrated assembler, that can continue to
> support this feature - that said, I can't find any support for emitting
> these directives in there... so I'm not sure where they're handled for the
> integrated assembler case.
>
>
>>
>> > Is the version directive valid anywhere else other than LLVM's
>> integrated assembler?)
>>
>> AFAIK, only the LLVM integrated assembler understands .ios_version_min
>> and .macosx_version_min.  I've checked the cctools sources and the latest
>> binutils GAS sources as well.
>>
>> http://reviews.llvm.org/D6371
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141122/41de8bbb/attachment.html>


More information about the llvm-commits mailing list