Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: tools/gn/secondary/build/toolchain/win/BUILD.gn

Issue 34603009: Improve Windows GN build setup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/gn/secondary/build/toolchain/win/BUILD.gn
diff --git a/tools/gn/secondary/build/toolchain/win/BUILD.gn b/tools/gn/secondary/build/toolchain/win/BUILD.gn
index 5887b922c2ec2a9ddc3d9a36ad5a2a9aeae23177..95cd9472abe1ea4d0f5fbcb317ecabf71709831e 100644
--- a/tools/gn/secondary/build/toolchain/win/BUILD.gn
+++ b/tools/gn/secondary/build/toolchain/win/BUILD.gn
@@ -13,11 +13,16 @@ assert(is_win)
#
# The list contains the include path as its only element. (I'm expecting to
# add more so it's currently a list inside a list.)
-msvc_config = [["foo"]]
#exec_script("get_msvc_config.py",
# [relative_root_output_dir],
# "value")
+# This will save the environment block and and copy the gyp-win-tool to the
+# build directory. We pass in the source file of the win tool.
+gyp_win_tool_source =
+ rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", root_build_dir)
+exec_script("setup_toolchain.py", [ gyp_win_tool_source ], "value")
+
# 32-bit toolchain -------------------------------------------------------------
toolchain("32") {
@@ -26,47 +31,47 @@ toolchain("32") {
lib_dir_prefix="/LIBPATH:"
tool("cc") {
- command = "ninja -t msvc -e \$arch -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
+ command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
description = "CC \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_c"
deps = "msvc"
}
tool("cxx") {
- command = "ninja -t msvc -e \$arch -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
+ command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
description = "CXX \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_cc"
deps = "msvc"
}
#tool("idl") {
- # command = $python_path gyp-win-tool midl-wrapper \$arch \$outdir \$tlb \$h \$dlldata \$iid \$
+ # command = $python_path gyp-win-tool midl-wrapper environment.x86 \$outdir \$tlb \$h \$dlldata \$iid \$
# \$proxy \$in \$idlflags
# description = IDL \$in
#}
tool("rc") {
- command = "$python_path gyp-win-tool rc-wrapper \$arch rc.exe \$defines \$includes \$rcflags /fo\$out \$in"
+ command = "$python_path gyp-win-tool rc-wrapper environment.x86 rc.exe \$defines \$includes \$rcflags /fo\$out \$in"
description = "RC \$in"
}
#tool("asm") {
- # command = $python_path gyp-win-tool asm-wrapper \$arch ml.exe \$defines \$includes /c /Fo \$
+ # command = $python_path gyp-win-tool asm-wrapper environment.x86 ml.exe \$defines \$includes /c /Fo \$
# \$out \$in
# description = ASM \$in
#}
tool("alink") {
- command = "$python_path gyp-win-tool link-wrapper \$arch lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
+ command = "$python_path gyp-win-tool link-wrapper environment.x86 lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
description = "LIB \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libflags"
}
#tool("solink_embed_inc") {
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$implibflag \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag \$
# /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch cmd /c if exist \$dll.manifest del \$dll.manifest && \$
- # $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests \$
- # -out:\$dll.manifest && $python_path gyp-win-tool manifest-to-rc \$arch \$dll.manifest \$
- # \$dll.manifest.rc 2 && $python_path gyp-win-tool rc-wrapper \$arch rc.exe \$
- # \$dll.manifest.rc && $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$
+ # manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && \$
+ # $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests \$
+ # -out:\$dll.manifest && $python_path gyp-win-tool manifest-to-rc environment.x86 \$dll.manifest \$
+ # \$dll.manifest.rc 2 && $python_path gyp-win-tool rc-wrapper environment.x86 rc.exe \$
+ # \$dll.manifest.rc && $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$
# \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp \$dll.manifest.res
# description = LINK_EMBED_INC(DLL) \$dll
# restat = 1
@@ -74,13 +79,13 @@ toolchain("32") {
# rspfile_content = \$libs \$in_newline \$ldflags
#}
#tool("solink_module_embed_inc") {
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$implibflag \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag \$
# /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch cmd /c if exist \$dll.manifest del \$dll.manifest && \$
- # $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests \$
- # -out:\$dll.manifest && $python_path gyp-win-tool manifest-to-rc \$arch \$dll.manifest \$
- # \$dll.manifest.rc 2 && $python_path gyp-win-tool rc-wrapper \$arch rc.exe \$
- # \$dll.manifest.rc && $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$
+ # manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && \$
+ # $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests \$
+ # -out:\$dll.manifest && $python_path gyp-win-tool manifest-to-rc environment.x86 \$dll.manifest \$
+ # \$dll.manifest.rc 2 && $python_path gyp-win-tool rc-wrapper environment.x86 rc.exe \$
+ # \$dll.manifest.rc && $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$
# \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp \$dll.manifest.res
# description = LINK_EMBED_INC(DLL) \$dll
# restat = 1
@@ -88,54 +93,54 @@ toolchain("32") {
# rspfile_content = \$libs \$in_newline \$ldflags
#}
#rule link_embed_inc
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo /OUT:\$out \$
- # /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper \$arch cmd /c \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo /OUT:\$out \$
+ # /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c \$
# if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests -out:\$out.manifest && \$
- # $python_path gyp-win-tool manifest-to-rc \$arch \$out.manifest \$out.manifest.rc 1 && \$
- # $python_path gyp-win-tool rc-wrapper \$arch rc.exe \$out.manifest.rc && \$
- # $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo /OUT:\$out /PDB:\$out.pdb \$
+ # manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$out.manifest && \$
+ # $python_path gyp-win-tool manifest-to-rc environment.x86 \$out.manifest \$out.manifest.rc 1 && \$
+ # $python_path gyp-win-tool rc-wrapper environment.x86 rc.exe \$out.manifest.rc && \$
+ # $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo /OUT:\$out /PDB:\$out.pdb \$
# @\$out.rsp \$out.manifest.res
# description = LINK_EMBED_INC \$out
# rspfile = \$out.rsp
# rspfile_content = \$in_newline \$libs \$ldflags
#rule solink_embed
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$implibflag \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag \$
# /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch cmd /c if exist \$dll.manifest del \$dll.manifest && \$
- # $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests \$
+ # manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && \$
+ # $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests \$
# -outputresource:\$dll;2
# description = LINK_EMBED(DLL) \$dll
# restat = 1
# rspfile = \$dll.rsp
# rspfile_content = \$libs \$in_newline \$ldflags
#rule solink_module_embed
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$implibflag \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag \$
# /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch cmd /c if exist \$dll.manifest del \$dll.manifest && \$
- # $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests \$
+ # manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && \$
+ # $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests \$
# -outputresource:\$dll;2
# description = LINK_EMBED(DLL) \$dll
# restat = 1
# rspfile = \$dll.rsp
# rspfile_content = \$libs \$in_newline \$ldflags
#rule link_embed
- # command = cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo /OUT:\$out \$
- # /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper \$arch cmd /c \$
+ # command = cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo /OUT:\$out \$
+ # /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c \$
# if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool \$
- # manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests -outputresource:\$out;1
+ # manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -outputresource:\$out;1
# description = LINK_EMBED \$out
# rspfile = \$out.rsp
# rspfile_content = \$in_newline \$libs \$ldflags
tool("solink") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper \$arch cmd /c if exist \$dll.manifest del \$dll.manifest && $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
description = "LINK(DLL) \$dll"
restat = "1"
rspfile = "\$dll.rsp"
rspfile_content = "\$libs \$in_newline \$ldflags"
}
tool("link") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper \$arch link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper \$arch cmd /c if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool manifest-wrapper \$arch mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
description = "LINK \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libs \$ldflags"
« no previous file with comments | « tools/gn/secondary/build/config/win/BUILD.gn ('k') | tools/gn/secondary/build/toolchain/win/setup_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698