# Compiler

Compiler

Specifies compiler and related files for network distribution.

Compiler( name ) ; (optional) Alias { .Executable ; Primary compiler executable .ExtraFiles ; (optional) Additional files (usually dlls) required by the compiler. }

The relative location of the source files controls how they will be mirrored on the remote machine. Files in 'ExtraFiles' in the same directory or in sub-directories under the primary 'Executable' will be placed in the same relative location on the remote machine. 'ExtraFiles' in other folders will be placed at the same level as the executable.

// Path behaviour example Compiler( 'Test' ) { .Executable = 'C:\compiler\compiler.exe' // dest: compiler.exe .ExtraFiles = { 'C:\compiler\subdir\helper.dll' // dest: subdir/helper.exe 'C:\cruntime\mvscrt.dll' // dest: msvcrt.dll }
Examples
Clang
// Clang for Windows Compiler( 'Compiler-x86Clang' ) { .Executable = '$ClangForWindowsBasePth$\clang++.exe' } Library( 'MyLibrary' ) { .Compiler = 'Compiler-x86Clang' // other options as per normal }
MSVC
// VisualStudio 2013 x86 Compiler Compiler( 'Compiler-x86' ) { .Executable = '$VSBasePath$\VC\bin\cl.exe' .ExtraFiles = { '$VSBasePath$\VC\bin\c1.dll' '$VSBasePath$\VC\bin\c1ast.dll', '$VSBasePath$\VC\bin\c1xx.dll', '$VSBasePath$\VC\bin\c1xxast.dll', '$VSBasePath$\VC\bin\c2.dll', '$VSBasePath$\VC\bin\msobj120.dll' '$VSBasePath$\VC\bin\mspdb120.dll' '$VSBasePath$\VC\bin\mspdbcore.dll' '$VSBasePath$\VC\bin\mspft120.dll' '$VSBasePath$\VC\bin\1033\clui.dll' '$VSBasePath$\VC\redist\x86\Microsoft.VC120.CRT\msvcp120.dll' '$VSBasePath$\VC\redist\x86\Microsoft.VC120.CRT\msvcr120.dll' '$VSBasePath$\VC\redist\x86\Microsoft.VC120.CRT\vccorlib120.dll' } } Library( 'MyLibrary' ) { .Compiler = 'Compiler-x86' // other options as per normal }