swig / cccl

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

Add "dumpmachine"/"dumpmachinefull" arguments to get the target machine triplet ("dumpmachinefull" for the full MSVC version). #15

Open falhumai96 opened 2 years ago

falhumai96 commented 2 years ago

Recreated the pull request from https://github.com/swig/cccl/pull/14, as I needed to change the source branch in my fork.

Add two new command-line arguments to get the target machine's triplet, by parsing the command-line output of cl:

These arguments precede any other arguments passed to cccl, and if dumpmachine/dumpmachinefull is processed, it will print the target triplet and exit succefully (the first of dumpmachine or dumpmachinefull will be processed).

falhumai96 commented 2 years ago

@vadz @wsfulton I dropped the last PR and recreated it because I needed to change the source branch from falhumai96:master to falhumai96:implement-dumpmachine, as I have another incoming change :grinning:.

Anyhow, @wsfulton, what do you mean by documentation from https://github.com/swig/cccl/pull/14#issuecomment-1057474889? I added some comments above my code implementation to indicate the purpose of the command-line arguments.