Flutter Engine
The Flutter Engine
|
Functions | |
_HostIsWindows () | |
SetEnvironmentAndGetRuntimeDllDirs () | |
_RegistryGetValueUsingWinReg (key, value) | |
_RegistryGetValue (key, value) | |
GetVisualStudioVersion () | |
DetectVisualStudioPath () | |
_CopyRuntimeImpl (target, source, verbose=True) | |
_SortByHighestVersionNumberFirst (list_of_str_versions) | |
_CopyUCRTRuntime (target_dir, source_dir, target_cpu, suffix) | |
FindVCComponentRoot (component) | |
FindVCRedistRoot () | |
_CopyRuntime (target_dir, source_dir, target_cpu, debug) | |
CopyDlls (target_dir, configuration, target_cpu) | |
_CopyDebugger (target_dir, target_cpu) | |
_GetDesiredVsToolchainHashes () | |
ShouldUpdateToolchain () | |
Update (force=False, no_download=False) | |
NormalizePath (path) | |
SetEnvironmentAndGetSDKDir () | |
GetToolchainDir () | |
main () | |
Variables | |
str | TOOLCHAIN_HASH = '27370823e7' |
str | SDK_VERSION = '10.0.22621.0' |
script_dir = os.path.dirname(os.path.realpath(__file__)) | |
json_data_file = os.path.join(script_dir, 'win_toolchain.json') | |
MSVS_VERSIONS | |
dict | MSVC_TOOLSET_VERSION |
|
protected |
Copy dbghelp.dll, dbgcore.dll, and msdia140.dll into the requested directory. target_cpu is one of 'x86', 'x64' or 'arm64'. dbghelp.dll is used when Chrome needs to symbolize stacks. Copying this file from the SDK directory avoids using the system copy of dbghelp.dll which then ensures compatibility with recent debug information formats, such as large-page PDBs. Note that for these DLLs to be deployed to swarming bots they also need to be listed in group("runtime_libs"). dbgcore.dll is needed when using some functions from dbghelp.dll (like MinidumpWriteDump). msdia140.dll is needed for tools like symupload.exe and dump_syms.exe.
Definition at line 412 of file vs_toolchain.py.
|
protected |
Copy the VS runtime DLLs, only if the target doesn't exist, but the target directory does exist. Handles VS 2015, 2017 and 2019.
Definition at line 367 of file vs_toolchain.py.
|
protected |
Copy |source| to |target| if it doesn't already exist or if it needs to be updated (comparing last modified time as an approximate float match as for some reason the values tend to differ by ~1e-07 despite being copies of the same file... https://crbug.com/603603).
Definition at line 245 of file vs_toolchain.py.
|
protected |
Copy both the msvcp and vccorlib runtime DLLs, only if the target doesn't exist, but the target directory does exist.
Definition at line 285 of file vs_toolchain.py.
|
protected |
Load a list of SHA1s corresponding to the toolchains that we want installed to build with.
Definition at line 456 of file vs_toolchain.py.
|
protected |
Returns True if running on a Windows host (including under cygwin).
Definition at line 65 of file vs_toolchain.py.
|
protected |
Definition at line 158 of file vs_toolchain.py.
|
protected |
Use the _winreg module to obtain the value of a registry key. Args: key: The registry key. value: The particular registry value to read. Return: contents of the registry key's value, or None on failure. Throws ImportError if _winreg is unavailable.
Definition at line 138 of file vs_toolchain.py.
|
protected |
This sorts |list_of_str_versions| according to version number rules so that version "1.12" is higher than version "1.9". Does not work with non-numeric versions like 1.4.a8 which will be higher than 1.4.a12. It does handle the versions being embedded in file paths.
Definition at line 266 of file vs_toolchain.py.
vs_toolchain.CopyDlls | ( | target_dir, | |
configuration, | |||
target_cpu | |||
) |
Copy the VS runtime DLLs into the requested directory as needed. configuration is one of 'Debug' or 'Release'. target_cpu is one of 'x86', 'x64' or 'arm64'. The debug configuration gets both the debug and release DLLs; the release config only the latter.
Definition at line 375 of file vs_toolchain.py.
vs_toolchain.DetectVisualStudioPath | ( | ) |
Return path to the installed Visual Studio.
Definition at line 207 of file vs_toolchain.py.
vs_toolchain.FindVCComponentRoot | ( | component | ) |
Find the most recent Tools or Redist or other directory in an MSVC install. Typical results are {toolchain_root}/VC/{component}/MSVC/{x.y.z}. The {x.y.z} version number part changes frequently so the highest version number found is used.
Definition at line 337 of file vs_toolchain.py.
vs_toolchain.FindVCRedistRoot | ( | ) |
In >=VS2017, Redist binaries are located in {toolchain_root}/VC/Redist/MSVC/{x.y.z}/{target_cpu}/. This returns the '{toolchain_root}/VC/Redist/MSVC/{x.y.z}/' path.
Definition at line 358 of file vs_toolchain.py.
vs_toolchain.GetToolchainDir | ( | ) |
Gets location information about the current toolchain (must have been previously updated by 'update'). This is used for the GN build.
Definition at line 562 of file vs_toolchain.py.
vs_toolchain.GetVisualStudioVersion | ( | ) |
Return best available version of Visual Studio.
Definition at line 165 of file vs_toolchain.py.
vs_toolchain.main | ( | ) |
Definition at line 581 of file vs_toolchain.py.
vs_toolchain.NormalizePath | ( | path | ) |
Definition at line 541 of file vs_toolchain.py.
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs | ( | ) |
Sets up os.environ to use the depot_tools VS toolchain with gyp, and returns the location of the VC runtime DLLs so they can be copied into the output directory after gyp generation. Return value is [x64path, x86path, 'Arm64Unused'] or None. arm64path is generated separately because there are multiple folders for the arm64 VC runtime.
Definition at line 69 of file vs_toolchain.py.
vs_toolchain.SetEnvironmentAndGetSDKDir | ( | ) |
Gets location information about the current sdk (must have been previously updated by 'update'). This is used for the GN build.
Definition at line 547 of file vs_toolchain.py.
vs_toolchain.ShouldUpdateToolchain | ( | ) |
Check if the toolchain should be upgraded.
Definition at line 465 of file vs_toolchain.py.
vs_toolchain.Update | ( | force = False , |
|
no_download = False |
|||
) |
Requests an update of the toolchain to the specific hashes we have at this revision. The update outputs a .json of the various configuration information required to pass to gyp which we use in |GetToolchainDir()|. If no_download is true then the toolchain will be configured if present but will not be downloaded.
Definition at line 478 of file vs_toolchain.py.
vs_toolchain.json_data_file = os.path.join(script_dir, 'win_toolchain.json') |
Definition at line 46 of file vs_toolchain.py.
dict vs_toolchain.MSVC_TOOLSET_VERSION |
Definition at line 59 of file vs_toolchain.py.
vs_toolchain.MSVS_VERSIONS |
Definition at line 51 of file vs_toolchain.py.
vs_toolchain.script_dir = os.path.dirname(os.path.realpath(__file__)) |
Definition at line 45 of file vs_toolchain.py.
str vs_toolchain.SDK_VERSION = '10.0.22621.0' |
Definition at line 43 of file vs_toolchain.py.
str vs_toolchain.TOOLCHAIN_HASH = '27370823e7' |
Definition at line 42 of file vs_toolchain.py.