[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-clang/recipes-devtools/clang/llvm-common/llvm-config b/meta/meta-clang/recipes-devtools/clang/llvm-common/llvm-config
new file mode 100644
index 0000000..4462896
--- /dev/null
+++ b/meta/meta-clang/recipes-devtools/clang/llvm-common/llvm-config
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+# Wrapper script for llvm-config. Supplies the right environment variables
+# for the target and delegates to the native llvm-config for anything else. This
+# is needed because arguments like --ldflags, --cxxflags, etc. are set by the
+# native compile rather than the target compile.
+#
+
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
+NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)"
+export YOCTO_ALTERNATE_EXE_PATH="$(readlink -f "$SCRIPT_DIR/../llvm-config")"
+
+if [[ $# == 0 ]]; then
+ exec "$NEXT_LLVM_CONFIG"
+fi
+
+if [[ $1 == "--libs" ]]; then
+ exec "$NEXT_LLVM_CONFIG" $@
+fi
+
+for arg in "$@"; do
+ case "$arg" in
+ --cppflags)
+ echo $TARGET_CPPFLAGS
+ ;;
+ --cflags)
+ echo $TARGET_CFLAGS
+ ;;
+ --cxxflags)
+ echo $TARGET_CXXFLAGS
+ ;;
+ --ldflags)
+ echo $TARGET_LDFLAGS
+ ;;
+ *)
+ echo "$("$NEXT_LLVM_CONFIG" "$arg")"
+ ;;
+ esac
+done