Skip to content

Commit 7b1a111

Browse files
committed
Run selective build CI test with more restrictions
Revert reason for #14487 was that internal tests were running with "-Werror,-Wunused-variable" option but not OSS tests
1 parent c9f46e2 commit 7b1a111

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

codegen/tools/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ target_include_directories(
2424

2525
# Compile options
2626
target_compile_options(
27-
selective_build PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions
27+
selective_build PUBLIC -Wno-deprecated-declarations -fPIC -frtti -fexceptions -Werror -Wunused-variable
2828
)
2929

3030
# Link against required libraries

codegen/tools/selective_build.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ get_kernel_tensor_metadatas_from_execution_plan(
186186

187187
const executorch_flatbuffer::Program* _get_program_from_buffer(
188188
const py::bytes& buffer) {
189+
190+
// TEST CODE to trigger CI failure
191+
const std::string_view sv = buffer.cast<std::string_view>();
192+
void* buf_ptr = const_cast<void*>(static_cast<const void*>(sv.data()));
193+
189194
return executorch_flatbuffer::GetProgram(
190195
buffer.cast<std::string_view>().data());
191196
}

0 commit comments

Comments
 (0)