diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2018-09-14 23:50:40 +0300 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2018-09-15 00:07:20 +0300 |
commit | 9d7d7702d8b28497259e98693d15e24123f6b60f (patch) | |
tree | 5358a243c8d570df529c4701a99ce1bf35ffbad0 /sdks | |
parent | 240407a06fb8faf8b32688d3bf08c0649004c208 (diff) |
[wasm] Don't copy assemblies when emitting ninja plus handle --assets with it.
Diffstat (limited to 'sdks')
-rw-r--r-- | sdks/wasm/Makefile | 3 | ||||
-rw-r--r-- | sdks/wasm/packager.cs | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sdks/wasm/Makefile b/sdks/wasm/Makefile index 4e598832b1b..cbd64030df0 100644 --- a/sdks/wasm/Makefile +++ b/sdks/wasm/Makefile @@ -157,11 +157,10 @@ mini_tests_basic.dll: $(MINI_BASIC_TEST_SOURCES) $(CSC) $(CSC_FLAGS) /unsafe -target:library -out:$@ -define:__MOBILE__,ARCH_32,NO_BITCODE /r:$(WASM_BCL_DIR)/mscorlib.dll $(MINI_BASIC_TEST_SOURCES) aot-sample: $(DRIVER_CONF)/.stamp-build packager.exe mini_tests_basic.dll runtime.g.js - mono packager.exe --emscripten-sdkdir=$(EMSCRIPTEN_SDKDIR) --mono-sdkdir=$(PWD)/../out -appdir=bin/aot-sample --builddir=obj/aot-sample --aot --nobinding mini_tests_basic.dll + mono packager.exe --emscripten-sdkdir=$(EMSCRIPTEN_SDKDIR) --mono-sdkdir=$(PWD)/../out -appdir=bin/aot-sample --builddir=obj/aot-sample --aot --nobinding --asset=aot-driver.js mini_tests_basic.dll ninja -v -C obj/aot-sample do-aot-sample: aot-sample - cp aot-driver.js bin/aot-sample (cd bin/aot-sample && $(SM) aot-driver.js) build-debug-sample: .stamp-build-debug-sample diff --git a/sdks/wasm/packager.cs b/sdks/wasm/packager.cs index 9445311581a..5e12d9729d0 100644 --- a/sdks/wasm/packager.cs +++ b/sdks/wasm/packager.cs @@ -359,8 +359,8 @@ class Driver { foreach (var assembly in asm_list) { string filename = Path.GetFileName (assembly); var filename_noext = Path.GetFileNameWithoutExtension (filename); - - File.Copy (assembly, Path.Combine (builddir, filename), true); + var source_file_path = Path.GetFullPath (assembly); + ninja.WriteLine ($"build $builddir/{filename}: cpifdiff {source_file_path}"); ninja.WriteLine ($"build $appdir/$deploy_prefix/{filename}: cpifdiff $builddir/{filename}"); if (enable_aot) { @@ -382,6 +382,13 @@ class Driver { ninja.WriteLine ($"build $appdir/mono.js: emcc-link $builddir/driver.o $mono_sdkdir/wasm-runtime/lib/libmonosgen-2.0.a {ofiles} | $tool_prefix/library_mono.js $tool_prefix/binding_support.js $tool_prefix/dotnet_support.js"); } + foreach(var asset in assets) { + var filename = Path.GetFileName (asset); + var abs_path = Path.GetFullPath (asset); + ninja.WriteLine ($"build $appdir/{filename}: cpifdiff {abs_path}"); + } + + ninja.Close (); } |