From 89538876f396376db3e0a961447adbd1f4b372fc Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Tue, 26 Jul 2022 13:06:58 +0000 Subject: [PATCH 1/6] =?UTF-8?q?Signed-off-by:=20xwx1135370=20=20attach=20->fport=20rm=20=E3=80=90fport=20rm=E3=80=91A?= =?UTF-8?q?fter=20repeated=20C++=20debugging,=20lldb=20returns=20"[Fail]hd?= =?UTF-8?q?c=20thread=20pool=20busy,=20may=20cause=20reset=20later"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lldb/source/Plugins/Platform/OHOS/PlatformOHOS.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Plugins/Platform/OHOS/PlatformOHOS.cpp b/lldb/source/Plugins/Platform/OHOS/PlatformOHOS.cpp index 249cd5e9d801..d28a73e3ec0d 100644 --- a/lldb/source/Plugins/Platform/OHOS/PlatformOHOS.cpp +++ b/lldb/source/Plugins/Platform/OHOS/PlatformOHOS.cpp @@ -221,6 +221,9 @@ Status PlatformOHOS::DisconnectRemote() { if (error.Success()) { m_device_id.clear(); m_sdk_version = 0; + if (m_remote_platform_sp) { + m_remote_platform_sp = nullptr; + } } return error; } -- Gitee From 0599d44e5e761a55c545a46a53903bb10ab80e1d Mon Sep 17 00:00:00 2001 From: xwx1135370 Date: Thu, 28 Jul 2022 11:34:39 +0000 Subject: [PATCH 2/6] =?UTF-8?q?Signed-off-by:=20xwx1135370=20=20HOS->HDC=5FSERVER=5FPORT.=20=E3=80=90lldb=E3=80=91=20?= =?UTF-8?q?OHOS=E6=89=93=E5=A3=B3=E8=BF=90=E8=A1=8C=EF=BC=8C=E7=AB=AF?= =?UTF-8?q?=E5=8F=A3=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lldb/source/Plugins/Platform/Android/AdbClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/lldb/source/Plugins/Platform/Android/AdbClient.cpp index ffccd6d628aa..50a4a07a9bab 100644 --- a/lldb/source/Plugins/Platform/Android/AdbClient.cpp +++ b/lldb/source/Plugins/Platform/Android/AdbClient.cpp @@ -134,7 +134,7 @@ Status AdbClient::Connect() { Status error; m_conn = std::make_unique(); std::string port = "5037"; - if (const char *env_port = std::getenv("ANDROID_ADB_SERVER_PORT")) { + if (const char *env_port = std::getenv("HDC_SERVER_PORT")) { port = env_port; } std::string uri = "connect://127.0.0.1:" + port; -- Gitee From 2dc6064bed7ee2ec39a0d2e94fc8de9cfc9a28fa Mon Sep 17 00:00:00 2001 From: chenhao346 Date: Fri, 29 Jul 2022 19:25:30 +0800 Subject: [PATCH 3/6] Resume download toolchain Signed-off-by: chenhao346 --- llvm-build/env_prepare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-build/env_prepare.sh b/llvm-build/env_prepare.sh index 527c69a51fd9..9a0adb720531 100755 --- a/llvm-build/env_prepare.sh +++ b/llvm-build/env_prepare.sh @@ -36,7 +36,7 @@ function download_and_archive() { archive_dir=$1 download_source_url=$2 bin_file=$(basename ${download_source_url}) - #wget -t3 -T10 -O "${bin_dir}/${bin_file}" "${download_source_url}" + wget -t3 -T10 -O "${bin_dir}/${bin_file}" "${download_source_url}" if [ ! -d "${code_dir}/${archive_dir}" ];then mkdir -p "${code_dir}/${archive_dir}" fi -- Gitee From 2910202c709cc6aee27daaad3c205643f09684f1 Mon Sep 17 00:00:00 2001 From: chenhao346 Date: Mon, 1 Aug 2022 10:48:46 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E3=80=90OHOS=E3=80=91=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E9=93=BE=E4=B8=8B=E8=BD=BD=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chenhao346 --- llvm-build/env_prepare.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm-build/env_prepare.sh b/llvm-build/env_prepare.sh index 9a0adb720531..59210a7c4f29 100755 --- a/llvm-build/env_prepare.sh +++ b/llvm-build/env_prepare.sh @@ -113,9 +113,9 @@ if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-${host_cpu}/clang-530132" ];the fi fi -if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-gnu-ubuntu-16.04.tar.xz" ];then +if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04" ];then rm -rf "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-10.0.1" - mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-gnu-ubuntu-16.04" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-10.0.1" + mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-10.0.1" fi if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang+llvm-10.0.1-x86_64-apple-darwin" ];then -- Gitee From be1c769b94a1aa7dcc7a33ba96663071a577635e Mon Sep 17 00:00:00 2001 From: liwentao_uiw Date: Tue, 2 Aug 2022 21:55:12 +0800 Subject: [PATCH 5/6] Update prebuilt dependency Signed-off-by: liwentao Change-Id: Ia10eb351fcd7764f02a2c7f00a2446910e19f6c9 --- llvm-build/env_prepare.sh | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/llvm-build/env_prepare.sh b/llvm-build/env_prepare.sh index 59210a7c4f29..acfc3d247f5d 100755 --- a/llvm-build/env_prepare.sh +++ b/llvm-build/env_prepare.sh @@ -51,20 +51,20 @@ function download_and_archive() { copy_config=""" -prebuilts/clang/ohos/${host_platform}-${host_cpu},https://mirrors.huaweicloud.com/openharmony/compiler/clang/12.0.1-530132/${host_platform}/clang-530132-${host_platform}-x86_64.tar.bz2 """ copy_config_linux_x86_64=""" prebuilts/cmake,https://mirrors.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/${host_platform}/cmake-${host_platform}-x86-3.16.5.tar.gz +prebuilts/clang/ohos/${host_platform}-${host_cpu},https://mirrors.huaweicloud.com/openharmony/compiler/clang/10.0.1-62608/${host_platform}/llvm.tar.gz prebuilts/clang/ohos/${host_platform}-${host_cpu},https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz """ copy_config_darwin_x86_64=""" prebuilts/cmake,https://mirrors.huaweicloud.com/harmonyos/compiler/cmake/3.16.5/${host_platform}/cmake-${host_platform}-x86-3.16.5.tar.gz -prebuilts/clang/ohos/${host_platform}-${host_cpu},https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/clang+llvm-10.0.1-x86_64-apple-darwin.tar.xz +prebuilts/clang/ohos/${host_platform}-${host_cpu},https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.0/clang+llvm-12.0.0-x86_64-apple-darwin.tar.xz """ -# + if [[ "${host_platform}" == "linux" ]]; then if [[ "${host_cpu}" == "x86_64" ]]; then copy_config+=${copy_config_linux_x86_64} @@ -86,7 +86,6 @@ else fi - for i in $(echo ${copy_config}) do unzip_dir=$(echo $i|awk -F ',' '{print $1}') @@ -95,30 +94,19 @@ do done -if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-530132" ];then +if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-62608" ];then rm -rf "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm" - mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-530132" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm" - ln -snf 12.0.1 "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/current" + mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-62608" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm" + ln -snf 10.0.1 "${code_dir}/prebuilts/clang/ohos/linux-x86_64/llvm/lib/clang/current" fi -if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-${host_cpu}/clang-530132" ];then - if [[ "${host_cpu}" == "arm64" ]]; then - rm -rf "${code_dir}/prebuilts/clang/ohos/darwin-arm64/llvm" - mv "${code_dir}/prebuilts/clang/ohos/darwin-arm64/clang-530132" "${code_dir}/prebuilts/clang/ohos/darwin-arm64/llvm" - ln -snf 12.0.1 "${code_dir}/prebuilts/clang/ohos/darwin-arm64/llvm/lib/clang/current" - else - rm -rf "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/llvm" - mv "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-530132" "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/llvm" - ln -snf 12.0.1 "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/llvm/lib/clang/current" - fi -fi if [ -d "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04" ];then rm -rf "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-10.0.1" mv "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang+llvm-10.0.1-x86_64-linux-gnu-ubuntu-16.04" "${code_dir}/prebuilts/clang/ohos/linux-x86_64/clang-10.0.1" fi -if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang+llvm-10.0.1-x86_64-apple-darwin" ];then +if [ -d "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang+llvm-12.0.0-x86_64-apple-darwin" ];then rm -rf "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-10.0.1" - mv "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang+llvm-10.0.1-x86_64-apple-darwin" "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-10.0.1" + mv "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang+llvm-12.0.0-x86_64-apple-darwin" "${code_dir}/prebuilts/clang/ohos/darwin-x86_64/clang-10.0.1" fi -- Gitee From 765dd8f1dd63e292f68af9d081c0ad650d4c1cb0 Mon Sep 17 00:00:00 2001 From: kosovpavel Date: Mon, 15 Aug 2022 16:01:08 +0300 Subject: [PATCH 6/6] [ohos-build] Use lld from prebuilts Signed-off-by: kosovpavel --- llvm-build/build.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm-build/build.py b/llvm-build/build.py index a200c11b05c4..0ce6a64935ac 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -509,6 +509,10 @@ class LlvmCore(BuildUtils): self.llvm_compile_llvm_defines(llvm_defines, llvm_cc, llvm_cxx, cflags, ldflags) + linker_path = os.path.abspath(os.path.join(self.build_config.REPOROOT_DIR, 'prebuilts', 'clang', + 'ohos', 'linux-x86_64', 'llvm', 'bin', 'ld.lld')) + llvm_defines['CMAKE_LINKER'] = linker_path + self.build_llvm(targets=self.build_config.TARGETS, build_dir=llvm_path, install_dir=out_dir, -- Gitee