Skip to content

Commit c4e325c

Browse files
swolchokkirklandsign
authored andcommitted
Fix -Wglobal-constructors/-Wshadow for executor_runner targets (#9509)
Disable one, fix the other. Testing: built internally
1 parent d96f24c commit c4e325c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

examples/portable/executor_runner/executor_runner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ int main(int argc, char** argv) {
302302
if (tracer.get_event_tracer()) {
303303
// Dump ETDump data containing profiling/debugging data to file specified in
304304
// command line flag.
305-
Error status = tracer.write_etdump_to_file();
305+
status = tracer.write_etdump_to_file();
306306
ET_CHECK_MSG(status == Error::Ok, "Failed to save ETDump file.");
307307
}
308308

examples/portable/executor_runner/targets.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def define_common_targets():
1313
runtime.cxx_library(
1414
name = "executor_runner_lib",
1515
srcs = ["executor_runner.cpp"],
16+
compiler_flags = ["-Wno-global-constructors"],
1617
deps = [
1718
"//executorch/runtime/executor:program",
1819
"//executorch/devtools/etdump:etdump_flatcc",
@@ -32,6 +33,7 @@ def define_common_targets():
3233
runtime.cxx_library(
3334
name = "executor_runner_lib_with_threadpool",
3435
srcs = ["executor_runner.cpp"],
36+
compiler_flags = ["-Wno-global-constructors"],
3537
deps = [
3638
"//executorch/runtime/executor:program",
3739
"//executorch/extension/data_loader:file_data_loader",

0 commit comments

Comments
 (0)