4

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

Techie Help
  • 161
  • 1
  • 6

1 Answers1

4

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"
DarcyThomas
  • 1,218
  • 13
  • 30
  • This also helped me to force compilation to happen for target x64, instead of x32, by passing the path to x64 cl.exe. Thanks! – David Choi Mar 09 '23 at 18:03