我正在尝试使用GN for Chromium源代码在我的Windows 10笔记本电脑上创建一个构建目录。这就是我所做的:
WIN TOOLCHAIN
系统环境变量并将其设置为0 C:\src\depot_tools
附加到我的系统Path
变量 - C:\src\depot_tools\src
是源代码所在的位置GN.exe.sha1
所在的同一文件夹中,该文件夹位于C:\src\depot_tools\src\buildtools\win
我尝试来运行gn gen out\Default
,但这会不断被抛出 -
gn gen out\Default
Traceback (most recent call last):
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 493, in <module>
sys.exit(main())
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 489, in main
return commands[sys.argv[1]](*sys.argv[2:])
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 312, in CopyDlls
_CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 292, in _CopyRuntime
suffix)
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 206, in _CopyUCRTRuntime
_CopyRuntimeImpl(target, source)
File "c:/src/depot_tools/src/build/vs_toolchain.py", line 193, in _CopyRuntimeImpl
shutil.copy2(source, target)
File "C:\src\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 130, in copy2
copyfile(src, dst)
File "C:\src\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'C:\\Windows\\Sysnative\\msvcp140d.dll'
ERROR at //build/toolchain/win/BUILD.gn:43:3: Script returned non-zero exit code.
exec_script("../../vs_toolchain.py",
^----------
Current dir: c:/src/depot_tools/src/out/Default/
Command: C:/src/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe -- c:/src/depot_tools/src/build/vs_toolchain.py copy_dlls c:/src/depot_tools/src/out/Default Debug x64
Returned 1 and printed out:
Copying C:\Windows\Sysnative\ucrtbase.dll to c:/src/depot_tools/src/out/Default\ucrtbase.dll...
Copying C:\Windows\Sysnative\msvcp140d.dll to c:/src/depot_tools/src/out/Default\msvcp140d.dll...
See //BUILD.gn:69:1: which caused the file to be included.
group("gn_all") {
^----------------