提交 b0e9ab9d 编写于 作者: O openharmony_ci 提交者: Gitee

!43 支持使用内置clang工具链

Merge pull request !43 from Caoruihong/ohos_clang
...@@ -50,7 +50,7 @@ if (!defined(board_configed_sysroot) || board_configed_sysroot == "") { ...@@ -50,7 +50,7 @@ if (!defined(board_configed_sysroot) || board_configed_sysroot == "") {
arch_cflags = string_join(" ", target_arch_cflags) arch_cflags = string_join(" ", target_arch_cflags)
command = "make TOPDIR=$ohos_root_path SYSROOTDIR=$sysroot_path TARGETS=$targets -f $makefile" command = "make TOPDIR=$ohos_root_path SYSROOTDIR=$sysroot_path TARGETS=$targets -f $makefile"
command += " ARCH=$arch TARGET=$target_triple ARCH_CFLAGS=\"$arch_cflags\"" command += " ARCH=$arch TARGET=$target_triple ARCH_CFLAGS=\"$arch_cflags\""
command += " BUILD_DEBUG=false BUILD_ALL_MULTILIB=false" command += " BUILD_DEBUG=false BUILD_ALL_MULTILIB=false CLANG=$ohos_current_cc_command"
# copy standard libraries libc.so and libc++.so to lib out dir # copy standard libraries libc.so and libc++.so to lib out dir
libcpp = "\$($ohos_current_cxx_command --target=$target_triple --sysroot=$sysroot_path $arch_cflags -print-file-name=libc++.so)" libcpp = "\$($ohos_current_cxx_command --target=$target_triple --sysroot=$sysroot_path $arch_cflags -print-file-name=libc++.so)"
......
...@@ -29,8 +29,9 @@ ...@@ -29,8 +29,9 @@
ARCH = arm ARCH = arm
TARGET = $(ARCH)-liteos TARGET = $(ARCH)-liteos
CROSS_COMPILE = llvm- CLANG ?= clang
CC = clang --target=$(TARGET) $(ARCH_CFLAGS) CROSS_COMPILE = $(CLANG:%clang=%)llvm-
CC = $(CLANG) --target=$(TARGET) $(ARCH_CFLAGS)
MULTILIB = $(patsubst $(shell $(CC) -print-file-name=)%/,%,$(dir $(shell $(CC) -print-libgcc-file-name))) MULTILIB = $(patsubst $(shell $(CC) -print-file-name=)%/,%,$(dir $(shell $(CC) -print-libgcc-file-name)))
MUSLBUILDDIR = build_$(ARCH)$(subst $(eval) ,,$(patsubst -%,_%,$(sort $(ARCH_CFLAGS)))) MUSLBUILDDIR = build_$(ARCH)$(subst $(eval) ,,$(patsubst -%,_%,$(sort $(ARCH_CFLAGS))))
HIDE = @ HIDE = @
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册