swig / cccl

Unix cc compiler to Microsoft's cl compiler wrapper
GNU General Public License v3.0
123 stars 36 forks source link

-m<arch> options should be mapped to /arch #1

Closed Artoria2e5 closed 5 years ago

Artoria2e5 commented 9 years ago

According to MSDN,

/G (Optimize for Processor) Options

/G is available in all editions of Visual C++, but the compiler can perform more optimizations when /G is used with one of the /O compiler options.

It seems to show that /G is more like -mtune.

wsfulton commented 9 years ago

The /G options for processor (/G1 and /G2) seem to have been dropped, they aren't listed for VS2012 and later at https://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.110).aspx. You probably got the MSDN quote from this page: https://msdn.microsoft.com/en-us/library/h66s5s0e(v=vs.100).aspx which also does not list versions > VS2010. The /G options that are currently mapped by cccl (/G3 /G4 /G5 /G6) also seem to have been dropped by Visual C++ as they aren't documented.

I'm inclined to consider adding in any obvious mappings that are needed and ignore all other -m options. This will keep to the stated goal of keeping cccl simple and lightweight and any complex tuning of flags can of course be done by the user of cccl.

wsfulton commented 6 years ago

@Artoria2e5 if you have a pull request to implement this please submit it. Otherwise, let's close this issue.