determine the path for exe in build.ninja

161 views
Skip to first unread message

Usha Nayak

unread,
Oct 26, 2022, 2:28:16 PM10/26/22
to ninja-build
Hello,

I'm new to gyp/ninja build system and would appreciate few pointers.

When I built an application using gyp/ninja on windows, 

I see 'build.ninja' with following configuration:
cl_x64 = "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"
cl_x86 = "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86\cl.exe"
cc = UNSET
cxx = UNSET
ld = link.exe
idl = midl.exe
ar = lib.exe
rc = rc.exe
ml_x86 = ml.exe
ml_x64 = ml64.exe
mt = mt.exe

I like to determine the path for all other executables as well namely, link.exe ?

During building, the output of the application shows :
[1/854] ninja -t msvc -e environment.x64 -- "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" /nologo /showIncludes /FC @obj\lib\zlib\nss_zlib.gzlib.obj.rsp /c ..\..\lib\zlib\gzlib.c /Foobj\lib\zlib\nss_zlib.gzlib.obj /Fdobj\lib\zlib\nss_zlib.c.pdb

Based on it, I'm assuming the path for link.exe is c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64 ?

It would be good to know for sure. I tried modifying ninja.py to get information on executables. Unfortunately, I haven't been quite successful in doing so. 

Appreciate help !! 

Thanks.





K. Moon

unread,
Oct 26, 2022, 3:25:50 PM10/26/22
to Usha Nayak, ninja-build
build.ninja is just an input to the Ninja build system; the creation of build.ninja is the responsibility of the metabuild system (GYP in this case). I think you'd have to reach out to the GYP mailing list for answers.

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/46c7f467-e96a-49d0-818b-8ee395c6908an%40googlegroups.com.

David Turner

unread,
Oct 27, 2022, 3:02:32 AM10/27/22
to Usha Nayak, ninja-build
On Wed, Oct 26, 2022 at 8:28 PM Usha Nayak <ush...@gmail.com> wrote:
Hello,

I'm new to gyp/ninja build system and would appreciate few pointers.

When I built an application using gyp/ninja on windows, 

I see 'build.ninja' with following configuration:
cl_x64 = "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe"
cl_x86 = "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x86\cl.exe"
cc = UNSET
cxx = UNSET
ld = link.exe
idl = midl.exe
ar = lib.exe
rc = rc.exe
ml_x86 = ml.exe
ml_x64 = ml64.exe
mt = mt.exe

This is the output of the gyp tool, which means you will have to modify your gyp configuration to ensure it writes the correct paths for ld, idl, ar, etc..
This also means there is nothing that Ninja can do for you here.


 
I like to determine the path for all other executables as well namely, link.exe ?

During building, the output of the application shows :
[1/854] ninja -t msvc -e environment.x64 -- "c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe" /nologo /showIncludes /FC @obj\lib\zlib\nss_zlib.gzlib.obj.rsp /c ..\..\lib\zlib\gzlib.c /Foobj\lib\zlib\nss_zlib.gzlib.obj /Fdobj\lib\zlib\nss_zlib.c.pdb

Based on it, I'm assuming the path for link.exe is c:\apps\MVS17\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64 ?

It would be good to know for sure. I tried modifying ninja.py to get information on executables. Unfortunately, I haven't been quite successful in doing so. 

Appreciate help !! 

Thanks.





Reply all
Reply to author
Forward
0 new messages