[LLVMdev] Mod for using GAS with MS VC++
Jeff Cohen
jeffc at jolt-lang.org
Mon Jul 11 20:18:14 PDT 2005
Chris Lattner wrote:
> On Tue, 12 Jul 2005, Aaron Gray wrote:
>
>>>>> Sure, but presumably you want to differentiate between nasm and
>>>>> masm (if they are not compatible) right?
>>>>
>>>>
>>>> Right
>>>
>>>
>>> Then you need something more specific than 'isWindows'. I'd
>>> suggest, isNASM and isMASM.
>>
>>
>> 'for' rather than 'is'
>
>
> Yeah sorry.
>
>> forMSVC ? There is more to it than that :(
>> I was going from the _WIN32 preprocessor symbol. So maybe 'forWIN32'
>> if it is actually needed.
>
>
> I'll leave this to you and jeffc to hash out. I'll point out again
> that if NASM and MASM are not the same, that using 'win32' will not
> work, because it will be defined for both of them.
>
> It looks like Nate just committed the subtarget support, so you might
> want to look at that.
>
> -Chris
>
_WIN32 is not suitable. It will also be defined for mingw, and as Chris
pointed out it does not differentiate between NASM and MASM.
To check for being built by MSVC++, look for _MSC_VER. I'm not sure how
to differentiate between gcc and mingw.
More information about the llvm-dev
mailing list