diff --git a/scripts/build.pl b/scripts/build.pl index 441ea54..de7bfba 100755 --- a/scripts/build.pl +++ b/scripts/build.pl @@ -202,7 +202,6 @@ local $ENV{WAMR_USE_LINEAR_POOL_IN_TEXT} = # ========================================================================================= # # NOTE: The runner will prefix "-Wf," to each flag -# TODO: Exclude --wamr-exceptions from C builds automatically my %catch_flag_map = ( "--catch-outer" => "--catch-outerspace", "--catch-text" => "--catch-write-textsegment", @@ -224,6 +223,12 @@ foreach my $experiment (@selected_experiments) { foreach my $target (@selected_targets) { foreach my $mode (@selected_modes) { + # Remove --wamr-exceptions for C builds, it is WAMR-specific + my @build_catch_flags = + $mode eq "c" + ? grep { $_ ne "--wamr-exceptions" } @selected_catch_flags + : @selected_catch_flags; + my $allocator_info = ""; if ( $mode eq "aot" || $mode eq "interp" ) { $allocator_info = @@ -267,7 +272,7 @@ foreach my $experiment (@selected_experiments) { && $selected_linear_pool_variant eq $linear_pool_variants[0] ) ? "wamr_linear_pool" : ""; - my $flags_info = join " ", @selected_catch_flags; + my $flags_info = join " ", @build_catch_flags; my $info_str = join " ", grep { length } ( @@ -288,7 +293,7 @@ foreach my $experiment (@selected_experiments) { "$local_root/build-$experiment/runner_flags"; open( my $fhandle, '>', $runner_flags_path ) or die "Cannot write $runner_flags_path: $!"; - print $fhandle "$catch_flag_map{$_}\n" for @selected_catch_flags; + print $fhandle "$catch_flag_map{$_}\n" for @build_catch_flags; close($fhandle); system( "mv", "$local_root/build.log",