elektronikworkshop / cocopa

Compiler Command Parser - Parser to extract include directories, defines, arguments from compiler command line invocations
Other
0 stars 3 forks source link

BuiltInInfoParser does not respect to "-std=gnu++11" #7

Open clouds56 opened 3 years ago

clouds56 commented 3 years ago

Now I have arduino with "-std=gnu++11", but the cocopa result override defines with __cplusplus=199711L, which expects to be __cplusplus=201103L. I think we should pass result.options here to get correct result https://github.com/elektronikworkshop/cocopa/blob/ce125785574735b777e2a40bad0e85dd41580692/src/Parser.ts#L127

tonymitchell commented 3 years ago

I have a similar issue that your suggested solution/PR would also fix. The current logic doesn't pass the -mmcu option to the compiler like "-mmcu=atmega328p" which drives the defines in avr/io.h such as PORTB, etc..