You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zh...@apache.org on 2024/07/26 09:38:25 UTC
(doris) branch master updated: [fix](arm) fix arm compilation (#38395)
This is an automated email from the ASF dual-hosted git repository.
zhangstar333 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 974188701e0 [fix](arm) fix arm compilation (#38395)
974188701e0 is described below
commit 974188701e0d553a77e653fb6c478371e19227b8
Author: zclllhhjj <zh...@selectdb.com>
AuthorDate: Fri Jul 26 17:38:15 2024 +0800
[fix](arm) fix arm compilation (#38395)
## Proposed changes
1. fix some not standard usages
2. remove an useless cmake flag
---
be/CMakeLists.txt | 16 ++++++++--------
be/src/util/bit_util.h | 2 +-
be/src/vec/functions/function_convert_tz.h | 20 ++++++++++----------
3 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 8ad11cf84ef..00d084bbc25 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -373,29 +373,29 @@ endif()
# For CMAKE_BUILD_TYPE=Debug
if (OS_MACOSX AND ARCH_ARM)
# Using -O0 may meet ARM64 branch out of range errors when linking with tcmalloc.
- set(CXX_FLAGS_DEBUG "${CXX_GCC_FLAGS} -Og")
+ set(CXX_FLAGS_DEBUG "-Og")
else()
- set(CXX_FLAGS_DEBUG "${CXX_GCC_FLAGS} -O0")
+ set(CXX_FLAGS_DEBUG "-O0")
endif()
# For CMAKE_BUILD_TYPE=Release
# -O3: Enable all compiler optimizations
# -DNDEBUG: Turn off dchecks/asserts/debug only code.
-set(CXX_FLAGS_RELEASE "${CXX_GCC_FLAGS} -O3 -DNDEBUG")
-set(CXX_FLAGS_ASAN "${CXX_GCC_FLAGS} -O0 -fsanitize=address -fsanitize=undefined -fno-strict-aliasing -fno-sanitize=alignment,signed-integer-overflow,float-cast-overflow -DUNDEFINED_BEHAVIOR_SANITIZER -DADDRESS_SANITIZER")
-set(CXX_FLAGS_LSAN "${CXX_GCC_FLAGS} -O0 -fsanitize=leak -DLEAK_SANITIZER")
+set(CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
+set(CXX_FLAGS_ASAN "-O0 -fsanitize=address -fsanitize=undefined -fno-strict-aliasing -fno-sanitize=alignment,signed-integer-overflow,float-cast-overflow -DUNDEFINED_BEHAVIOR_SANITIZER -DADDRESS_SANITIZER")
+set(CXX_FLAGS_LSAN "-O0 -fsanitize=leak -DLEAK_SANITIZER")
## Use for BE-UT
-set(CXX_FLAGS_ASAN_UT "${CXX_GCC_FLAGS} -O0 -fsanitize=address -DADDRESS_SANITIZER")
+set(CXX_FLAGS_ASAN_UT "-O0 -fsanitize=address -DADDRESS_SANITIZER")
# Set the flags to the undefined behavior sanitizer, also known as "ubsan"
# Turn on sanitizer and debug symbols to get stack traces:
-set(CXX_FLAGS_UBSAN "${CXX_GCC_FLAGS} -O0 -fno-wrapv -mcmodel=medium -fsanitize=undefined -DUNDEFINED_BEHAVIOR_SANITIZER")
+set(CXX_FLAGS_UBSAN "-O0 -fno-wrapv -mcmodel=medium -fsanitize=undefined -DUNDEFINED_BEHAVIOR_SANITIZER")
# Set the flags to the thread sanitizer, also known as "tsan"
# Turn on sanitizer and debug symbols to get stack traces:
# Use -Wno-builtin-declaration-mismatch to mute warnings like "new declaration ‘__tsan_atomic16 __tsan_atomic16_fetch_nand(..."
# If use -O0 to compile, BE will stack overflow when start. https://github.com/apache/doris/issues/8868
-set(CXX_FLAGS_TSAN "${CXX_GCC_FLAGS} -O1 -fsanitize=thread -DTHREAD_SANITIZER -Wno-missing-declarations")
+set(CXX_FLAGS_TSAN "-O1 -fsanitize=thread -DTHREAD_SANITIZER -Wno-missing-declarations")
# Set compile flags based on the build type.
if ("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
diff --git a/be/src/util/bit_util.h b/be/src/util/bit_util.h
index 6934f45ef3e..44b391f44da 100644
--- a/be/src/util/bit_util.h
+++ b/be/src/util/bit_util.h
@@ -104,7 +104,7 @@ public:
T value = input;
for (int i = 0; i < sizeof(value); ++i) {
// Applies a mask for a byte range on the input.
- char value_to_save = value & 0XFF;
+ signed char value_to_save = value & 0XFF;
buffer.push_back(value_to_save);
// Remove the just processed part from the input so that we can exit early if there
// is nothing left to process.
diff --git a/be/src/vec/functions/function_convert_tz.h b/be/src/vec/functions/function_convert_tz.h
index bbcc09e911b..c9739c2e9be 100644
--- a/be/src/vec/functions/function_convert_tz.h
+++ b/be/src/vec/functions/function_convert_tz.h
@@ -126,12 +126,12 @@ public:
std::move(result_column), std::move(result_null_map_column));
} else {
auto result_column = ColumnType::create();
- execute(context, assert_cast<const ColumnType*>(argument_columns[0].get()),
- assert_cast<const ColumnString*>(argument_columns[1].get()),
- assert_cast<const ColumnString*>(argument_columns[2].get()),
- assert_cast<ReturnColumnType*>(result_column.get()),
- assert_cast<ColumnUInt8*>(result_null_map_column.get())->get_data(),
- input_rows_count);
+ _execute(context, assert_cast<const ColumnType*>(argument_columns[0].get()),
+ assert_cast<const ColumnString*>(argument_columns[1].get()),
+ assert_cast<const ColumnString*>(argument_columns[2].get()),
+ assert_cast<ReturnColumnType*>(result_column.get()),
+ assert_cast<ColumnUInt8*>(result_null_map_column.get())->get_data(),
+ input_rows_count);
block.get_by_position(result).column = ColumnNullable::create(
std::move(result_column), std::move(result_null_map_column));
} //if const
@@ -139,10 +139,10 @@ public:
}
private:
- static void execute(FunctionContext* context, const ColumnType* date_column,
- const ColumnString* from_tz_column, const ColumnString* to_tz_column,
- ReturnColumnType* result_column, NullMap& result_null_map,
- size_t input_rows_count) {
+ static void _execute(FunctionContext* context, const ColumnType* date_column,
+ const ColumnString* from_tz_column, const ColumnString* to_tz_column,
+ ReturnColumnType* result_column, NullMap& result_null_map,
+ size_t input_rows_count) {
for (size_t i = 0; i < input_rows_count; i++) {
if (result_null_map[i]) {
result_column->insert_default();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org