Files
openide/native/WslTools/Makefile
Ilya.Kazakevich e23b3dcbc9 PY-50751: Custom rsync for WSL.
``rsync`` is slow because every file system access call from WSL to Windows and vice versa is slow.
We need to decrement number of such calls.

This approach does the following:
* Calculates hashes on Windows side using Intellij process
* Calculates hashes on WSL side using native Linux process
* Compares them searching for differences
* Splits different files into groups, tars each group and copies them on the other side.

From what I checked this is the fastest approach to sync WSL and Windows.

* How to use *

`WslSyncAction` is a temporary internal only action. Run it and try to sync some folder.

`WslSync` is a class with static method you can use to sync to folders.

GitOrigin-RevId: 6c63329d73ff32b7ee5e4436bfde39e72fe35a44
2022-02-04 23:47:52 +00:00

29 lines
823 B
Makefile

MUSL_VER := 1.2.2
# Where to unpack musl
MUSL_DISTR := musl
# Where to install musl
MUSL_HOME := $(HOME)/musl
# Musl gcc wrapper (use it co compile)
MUSL_CC := $(MUSL_HOME)/bin/musl-gcc
CFLAGS = -Wall -Wextra -pedantic -Werror -Os -D_POSIX_SOURCE=1 -D_BSD_SOURCE=1
LDLIBS = -static
CC = $(MUSL_CC)
all: $(MUSL_CC) wslproxy wslhash
musl:
@echo I will now download musl. If it fails, check you have wget and see README
wget https://musl.libc.org/releases/musl-$(MUSL_VER).tar.gz -O musl.tar.gz
tar xfvz musl.tar.gz && mv musl-$(MUSL_VER) $(MUSL_DISTR)
$(MUSL_CC): musl
cd $(MUSL_DISTR) && ./configure --prefix=$(MUSL_HOME) --syslibdir=$(MUSL_HOME)/lib && $(MAKE) && $(MAKE) install
wslproxy: $(SOURCES) | $(MUSL_CC)
wslhash: wslhash.c xxhash.h xxhash.c | $(MUSL_CC)
.PHONY: all clean
clean:
$(RM) wslproxy wslhash