Skip to content

Commit ad9f0ed

Browse files
committed
Make sure size_test CI uses -Wall -Werror
1 parent 88886b8 commit ad9f0ed

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

runtime/kernel/operator_registry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void make_kernel_key_string(Span<const TensorMeta> key, char* buf) {
135135
// If no tensor is present in an op, kernel key does not apply
136136
return;
137137
}
138-
strncpy(buf, "v1/", 3);
138+
strcpy(buf, "v1/");
139139
buf += 3;
140140
for (size_t i = 0; i < key.size(); i++) {
141141
auto& meta = key[i];

test/build_size_test.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ source "$(dirname "${BASH_SOURCE[0]}")/../.ci/scripts/utils.sh"
1414
cmake_install_executorch_lib() {
1515
echo "Installing libexecutorch.a"
1616
clean_executorch_install_folders
17-
18-
CXXFLAGS="-fno-exceptions -fno-rtti" retry cmake -DBUCK2="$BUCK2" \
17+
18+
# Remove -Wno-sign-compare (https://github.com/pytorch/executorch/issues/8149)
19+
CXXFLAGS="-fno-exceptions -fno-rtti -Wall -Werror -Wno-sign-compare" retry cmake -DBUCK2="$BUCK2" \
1920
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
2021
-DCMAKE_INSTALL_PREFIX=cmake-out \
2122
-DCMAKE_BUILD_TYPE=Release \
@@ -27,7 +28,8 @@ cmake_install_executorch_lib() {
2728
}
2829

2930
test_cmake_size_test() {
30-
CXXFLAGS="-fno-exceptions -fno-rtti" retry cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake-out -Bcmake-out/test test
31+
# Remove -Wno-sign-compare (https://github.com/pytorch/executorch/issues/8149)
32+
CXXFLAGS="-fno-exceptions -fno-rtti -Wall -Werror -Wno-sign-compare" retry cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=cmake-out -Bcmake-out/test test
3133

3234
echo "Build size test"
3335
cmake --build cmake-out/test -j9 --config Release

0 commit comments

Comments
 (0)