diff options
-rwxr-xr-x | tools/build_third_party.py | 8 | ||||
-rw-r--r-- | tools/util.py | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/build_third_party.py b/tools/build_third_party.py index 474fcbfd2..f32d669b2 100755 --- a/tools/build_third_party.py +++ b/tools/build_third_party.py @@ -25,10 +25,10 @@ run(["cargo", "fetch", "--manifest-path=" + root_path + "/Cargo.toml"], run(["gclient", "sync", "--reset", "--shallow", "--no-history", "--nohooks"], envs={'GCLIENT_FILE': root_path + "/gclient_config.py"}) # TODO(ry) Is it possible to remove these symlinks? -remove_and_symlink("v8/third_party/googletest", "googletest") -remove_and_symlink("v8/third_party/jinja2", "jinja2") -remove_and_symlink("v8/third_party/llvm-build", "llvm-build") -remove_and_symlink("v8/third_party/markupsafe", "markupsafe") +remove_and_symlink("v8/third_party/googletest", "googletest", True) +remove_and_symlink("v8/third_party/jinja2", "jinja2", True) +remove_and_symlink("v8/third_party/llvm-build", "llvm-build", True) +remove_and_symlink("v8/third_party/markupsafe", "markupsafe", True) # To update the deno_third_party git repo after running this, try the following: # cd third_party diff --git a/tools/util.py b/tools/util.py index 8b8628aba..8a65f2ede 100644 --- a/tools/util.py +++ b/tools/util.py @@ -36,6 +36,10 @@ def symlink(target, name, target_is_dir=False): CreateSymbolicLinkW.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32) + # Replace forward slashes by backward slashes. + # Strangely it seems that this is only necessary for symlinks to files. + # Forward slashes don't cause any issues when the target is a directory. + target = target.replace("/", "\\") flags = 0x02 # SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE if (target_is_dir): flags |= 0x01 # SYMBOLIC_LINK_FLAG_DIRECTORY |