imay closed pull request #330: Support for custom build toolchains
URL: https://github.com/apache/incubator-doris/pull/330
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index cef37678..3db6acaf 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -408,7 +408,12 @@ message(STATUS "${LINUX_VERSION_LOWER}")
 #     message(FATAL_ERROR "Currently not support system ${LINUX_VERSION}")
 # endif()
 
+if(DEFINED ENV{CLANG_COMPATIBLE_FLAGS})
+    set(CLANG_COMPATIBLE_FLAGS $ENV{CLANG_COMPATIBLE_FLAGS})
+endif()
+
 message(STATUS "CLANG_BASE_FLAGS: ${CLANG_BASE_FLAGS}")
+message(STATUS "CLANG_COMPATIBLE_FLAGS: ${CLANG_COMPATIBLE_FLAGS}")
 
 set(CLANG_INCLUDE_FLAGS
     "-I${LLVM_HOME}/include"
@@ -419,6 +424,7 @@ set(CLANG_INCLUDE_FLAGS
     "-I${THIRDPARTY_DIR}/include/event/"
     "-I${GPERFTOOLS_HOME}/include"
     ${CLANG_BASE_FLAGS}
+    ${CLANG_COMPATIBLE_FLAGS}
 )
 
 # Set include dirs
diff --git a/env.sh b/env.sh
index 54305455..6c817685 100755
--- a/env.sh
+++ b/env.sh
@@ -80,3 +80,8 @@ if [[ ! "$(printf '%s\n' "$required_ver" "$gcc_ver" | sort -V 
| head -n1)" = "$r
     exit 1
 fi
 
+# export CLANG COMPATIBLE FLAGS
+export CLANG_COMPATIBLE_FLAGS=`echo | ${DORIS_GCC_HOME}/bin/gcc -Wp,-v -xc++ - 
-fsyntax-only 2>&1 \
+                | grep -E '^\s+/' | awk '{print "-I" $1}' | tr '\n' ' '`
+
+


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to