Skip to content

Commit bc62f9a

Browse files
committed
Update
[ghstack-poisoned]
2 parents dd349ab + 34e9026 commit bc62f9a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backends/apple/coreml/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ if(APPLE)
206206
coremldelegate PRIVATE C10_USING_CUSTOM_GENERATED_MACROS
207207
)
208208

209+
# The profiler hooks in this delegate compile only when the sdk sources below
210+
# are also built, because they import a header that ships with them. A build
211+
# that turns the tracer on globally without those sources would fail here, so
212+
# keep this target out of it rather than half enabling it.
213+
if(NOT EXECUTORCH_BUILD_DEVTOOLS)
214+
target_compile_options(coremldelegate PRIVATE -UET_EVENT_TRACER_ENABLED)
215+
endif()
216+
209217
if(EXECUTORCH_BUILD_DEVTOOLS)
210218
target_sources(coremldelegate PRIVATE ${SDK_SOURCES} ${PROTOBUF_SOURCES})
211219
target_include_directories(

0 commit comments

Comments
 (0)