Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

specify compiler in gyp

Tags:

gyp

I am using gyp for the first time and I have already read its online help. I have set a compiler using CC option in export variables on command-line(Using cygwin in windows). So, all the files compile properly. Now, I wnat to compile few files using a different compiler. So, I am specifying it like this:

'target_name' : 'LIBADD',

'type' : 'static_library',

'CC' : '/cygdrive/c/cygwin/bin/gcc',

But, it still takes the compiler defined using exports for this target as well.

Also, I have got 5 files, for which I need to make object files, specify different different compiler options. Then, i need to make a static library from all these .o file. Is this possible and if how?

Thanks for the help

like image 244
Techie Help Avatar asked Oct 15 '25 17:10

Techie Help


1 Answers

This may help you: https://code.google.com/p/v8/wiki/BuildingWithGYP#Clang_+_make

You need to add some exports (example to use the clang compiler)

export CC=/path/to/clang
export CXX=/path/to/clang++
export GYP_DEFINES="clang=1"
like image 164
DarcyThomas Avatar answered Oct 19 '25 12:10

DarcyThomas