зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 684203: Add NinjaHelloWorld example
This commit is contained in:
Родитель
f9331ffb7c
Коммит
799c07fc2e
|
@ -17,6 +17,8 @@
|
|||
/examples/CMakeHelloWorld/Out/
|
||||
/examples/MsBuildHelloWorld/Out/
|
||||
/examples/MsBuildHelloWorld/Debug/
|
||||
/examples/NinjaHelloWorld/Out
|
||||
/examples/NinjaHelloWorld/src/Out
|
||||
bin/
|
||||
obj/
|
||||
contentcache/
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# Instructions
|
||||
|
||||
1. Setup BuildXL as explained in the documentation
|
||||
2. Point the environment variable BUILDXL_BIN to the BuildXL binary folder path. For example, if you set up BuildXL in D:\BuildXL, then D:\BuildXL\Out\Bin\debug\win-x64 should be the value.
|
||||
3. Be aware that BuildXL requires the Ninja executable to evaluate the build specification. This means that `ninja.exe` should be in your `PATH`.
|
||||
4. Run .\build.ps1 from PowerShell, or equivalently build.bat from the command line prompt
|
||||
|
||||
The build outputs (`hello_copy.txt`, `hello_world.txt`) will be located in `Out`. For further configuration options, see the `NinjaResolverSettings` in https://github.com/microsoft/BuildXL/blob/master/Public/Sdk/Public/Prelude/Prelude.Configuration.Resolvers.dsc
|
|
@ -0,0 +1 @@
|
|||
%BUILDXL_BIN%/bxl /c:config.dsc /server- /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1 @@
|
|||
& $Env:BUILDXL_BIN/bxl /c:config.dsc /server- /disableProcessRetryOnResourceExhaustion+
|
|
@ -0,0 +1,13 @@
|
|||
config({
|
||||
resolvers: [
|
||||
{
|
||||
kind: "Ninja",
|
||||
root: d`src`,
|
||||
moduleName: "HelloWorld",
|
||||
keepProjectGraphFile: true,
|
||||
}
|
||||
],
|
||||
|
||||
// Inbox SDK is not currently working with the Ninja resolver
|
||||
disableInBoxSdkSourceResolver: true,
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
rule copy_file
|
||||
command = cmd /C "copy $in $out"
|
||||
|
||||
rule copy_append
|
||||
command = cmd /C copy $in $out && echo world! >> $out
|
||||
|
||||
build ..\Out\hello_copy.txt: copy_file hello.txt
|
||||
|
||||
build ..\Out\hello_world.txt: copy_append ..\Out\hello_copy.txt
|
||||
|
||||
build helloworld: phony ..\Out\hello_world.txt
|
||||
|
||||
default helloworld
|
|
@ -0,0 +1 @@
|
|||
Hello,
|
Загрузка…
Ссылка в новой задаче