BUILD.gn 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #-------------------------------------------------------------------------------------------------------
  2. # Copyright (C) Microsoft. All rights reserved.
  3. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. #-------------------------------------------------------------------------------------------------------
  5. action("ChakraCoreBuild") {
  6. script = "tools/run_msbuild.py"
  7. chakracore_solution = rebase_path("Build\Chakra.Core.sln")
  8. # NOSORT
  9. sources = [
  10. chakracore_solution
  11. ]
  12. outputs = [
  13. "$target_gen_dir/ChakraCore.lib",
  14. "$target_gen_dir/../../../ChakraCore.pdb",
  15. "$target_gen_dir/../../../ChakraCore.dll"
  16. ]
  17. # The path should be like: "Build/VcBuild/bin/x64_debug""
  18. outdir = "Build/VcBuild/bin/" + current_cpu
  19. if (is_debug) {
  20. config = "Debug"
  21. outdir = outdir + "_debug"
  22. }
  23. else {
  24. config = "Release"
  25. outdir = outdir + "_release"
  26. }
  27. outdir = rebase_path(outdir)
  28. # On Windows, run msbuild.exe on sln and copy lib, dll, pdb files to appropriate locations,
  29. # def main(sln, outdir, target_gen_dir, *flags):
  30. args = [
  31. chakracore_solution,
  32. outdir,
  33. rebase_path(target_gen_dir),
  34. "/m",
  35. "/t:Build",
  36. "/p:Configuration=$config",
  37. "/p:platform=$current_cpu"
  38. ]
  39. }