Skip to content

Commit 091d059

Browse files
committed
Add --drop-edges command line argument
1 parent 0f9190b commit 091d059

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

base/options.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ struct JLOptions
6363
task_metrics::Int8
6464
timeout_for_safepoint_straggler_s::Int16
6565
serialize_machine_code_only::Int8
66+
drop_edges::Int8
6667
end
6768

6869
# This runs early in the sysimage != is not defined yet

src/jloptions.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ JL_DLLEXPORT void jl_init_options(void)
9696
0, // task_metrics
9797
25, // timeout_for_safepoint_straggler_s
9898
0, // serialize_machine_code_only
99+
0, // drop_edges
99100
};
100101
jl_options_initialized = 1;
101102
}
@@ -247,6 +248,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
247248
opt_inline,
248249
opt_polly,
249250
opt_serialize_machine_code_only,
251+
opt_drop_edges,
250252
opt_timeout_for_safepoint_straggler,
251253
opt_trace_compile,
252254
opt_trace_compile_timing,
@@ -328,6 +330,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
328330
{ "inline", required_argument, 0, opt_inline },
329331
{ "polly", required_argument, 0, opt_polly },
330332
{ "serialize-machine-code-only", no_argument, 0, opt_serialize_machine_code_only },
333+
{ "drop-edges", no_argument, 0, opt_drop_edges },
331334
{ "timeout-for-safepoint-straggler", required_argument, 0, opt_timeout_for_safepoint_straggler },
332335
{ "trace-compile", required_argument, 0, opt_trace_compile },
333336
{ "trace-compile-timing", no_argument, 0, opt_trace_compile_timing },
@@ -899,6 +902,9 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
899902
case opt_serialize_machine_code_only:
900903
jl_options.serialize_machine_code_only = 1;
901904
break;
905+
case opt_drop_edges:
906+
jl_options.drop_edges = 1;
907+
break;
902908
case opt_task_metrics:
903909
if (!strcmp(optarg, "no"))
904910
jl_options.task_metrics = JL_OPTIONS_TASK_METRICS_OFF;

src/jloptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ typedef struct {
6767
int8_t task_metrics;
6868
int16_t timeout_for_safepoint_straggler_s;
6969
int8_t serialize_machine_code_only;
70+
int8_t drop_edges;
7071
} jl_options_t;
7172

7273
#endif

test/cmdlineargs.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,3 +1137,8 @@ end
11371137
exename = `$(Base.julia_cmd())`
11381138
@test parse(Int,read(`$exename --serialize-machine-code-only -E "Base.JLOptions().serialize_machine_code_only"`, String)) == 1
11391139
end
1140+
1141+
@testset "--drop-edges" begin
1142+
exename = `$(Base.julia_cmd())`
1143+
@test parse(Int,read(`$exename --drop-edges -E "Base.JLOptions().drop_edges`, String)) == 1
1144+
end

0 commit comments

Comments
 (0)