Skip to content

Commit

Permalink
Merge pull request #726 from unoplatform/dev/jela/aot-instances-rsp
Browse files Browse the repository at this point in the history
fix: Adjust response file for aot-instances
  • Loading branch information
jeromelaban authored May 19, 2023
2 parents 76c35fe + 6130aee commit 4211d39
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/Uno.Wasm.Packager/packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,10 @@ int Run (string[] args) {
// environment.Add("MONO_THREADS_SUSPEND=coop");
}

var response_prefix = is_windows
? "`@"
: "@";

var aot_cross_prefix = is_windows
? $"cmd /c set \"MONO_PATH=$mono_path\" &&" + string.Join(" ", environment.Select(e => $"set \"{e}\" &&"))
: string.Join(" ", environment);
Expand All @@ -1419,11 +1423,14 @@ int Run (string[] args) {
ninja.WriteLine ("rule aot");
ninja.WriteLine ($" command = {aot_cross_prefix} $cross --debug {profiler_aot_args} {aot_compiler_options} --aot=$aot_args,$aot_base_args,depfile=$depfile,llvm-outfile=$outfile $src_file");
ninja.WriteLine (" description = [AOT] $src_file -> $outfile");

ninja.WriteLine ("rule aot-instances");
ninja.WriteLine ($" command = {aot_cross_prefix} $cross --debug {profiler_aot_args} {aot_compiler_options} --aot=$aot_base_args,llvm-outfile=$outfile,dedup-include=$dedup_image $src_files");
ninja.WriteLine ($" command = {aot_cross_prefix} $cross --response=$builddir/aot-instances.rsp");
ninja.WriteLine ($" rspfile = $builddir/aot-instances.rsp");
ninja.WriteLine ($" rspfile_content = --debug {profiler_aot_args} {aot_compiler_options} --aot=$aot_base_args,llvm-outfile=$outfile,dedup-include=$dedup_image $src_files");
ninja.WriteLine (" description = [AOT-INSTANCES] $outfile");
ninja.WriteLine ("rule mkdir");

ninja.WriteLine ("rule mkdir");
if (Environment.OSVersion.Platform != PlatformID.Win32NT)
{
ninja.WriteLine(" command = mkdir -p $out");
Expand Down Expand Up @@ -1475,10 +1482,6 @@ int Run (string[] args) {
? "powershell"
: "";

var response_prefix = is_windows
? "`@"
: "@";

ninja.WriteLine ("rule create-emsdk-env");
ninja.WriteLine ($" command = {tools_shell_prefix} \"$emscripten_sdkdir/emsdk\" construct_env > $out");

Expand Down

0 comments on commit 4211d39

Please sign in to comment.