Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promote ohos targets to tier2 with host tools. #137011

Merged
merged 8 commits into from
Mar 16, 2025

Conversation

LuuuXXX
Copy link
Contributor

@LuuuXXX LuuuXXX commented Feb 14, 2025

What does this PR try to resolve?

Try to promote the following [Tier 2 without Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools) targets to [Tier 2 with Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools):

  • aarch64-unknown-linux-ohos
  • armv7-unknown-linux-ohos
  • x86_64-unknown-linux-ohos

More Information?

see MCP: rust-lang/compiler-team#811

Blockage to be solved?

  • Submit an MCP
  • Submit code of promote ohos targets
  • Resolve related dependencies (measureme

The modified code of the measureme has been merged (see https://github.com/rust-lang/measureme/pull/238). [done]
The new version will was released (rust-lang/measureme#240). [done]

@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2025

r? @Kobzol

rustbot has assigned @Kobzol.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 14, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2025

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@LuuuXXX LuuuXXX changed the title 【WIP】Promote ohos targets to tier2 with host tools. [WIP] Promote ohos targets to tier2 with host tools. Feb 14, 2025
@rust-log-analyzer

This comment has been minimized.

@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Feb 14, 2025

The measureme-mirror used to replace the measureme cannot pass the tidy check. It seems that a new measureme version is required.

@Kobzol
Copy link
Contributor

Kobzol commented Feb 14, 2025

This job runs on the free GitHub runners, so in terms of infra cost, the build time increase should be fine.

@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Feb 15, 2025

Very appreciate it.

@LuuuXXX LuuuXXX changed the title [WIP] Promote ohos targets to tier2 with host tools. Promote ohos targets to tier2 with host tools. Feb 15, 2025
@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Feb 15, 2025

It seems guard is ok

@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Feb 18, 2025

r? @Amanieu

@rustbot rustbot assigned Amanieu and unassigned Kobzol Feb 18, 2025
@@ -2353,7 +2367,7 @@ dependencies = [
"libc",
"libffi",
"libloading",
"measureme",
"measureme 11.0.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems miri is still using measureme 11, could this cause problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this tool in my local test.

@@ -51,7 +62,7 @@ ENV RUST_CONFIGURE_ARGS \
--enable-profiler \
--disable-docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You want to add: --full-tools --extended --sanitizers here as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that should be --enable-extended --enable-full-tools --enable-sanitizers.

Copy link
Contributor Author

@LuuuXXX LuuuXXX Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that should be --enable-extended --enable-full-tools --enable-sanitizers.

After --enable-sanitizers, the unwinder library is missing during sanitizers compilation.

Building sanitizers for aarch64-unknown-linux-ohos
CMAKE_TOOLCHAIN_FILE_aarch64-unknown-linux-ohos = None
CMAKE_TOOLCHAIN_FILE_aarch64_unknown_linux_ohos = None
TARGET_CMAKE_TOOLCHAIN_FILE = None
CMAKE_TOOLCHAIN_FILE = None
CMAKE_PREFIX_PATH_aarch64-unknown-linux-ohos = None
CMAKE_PREFIX_PATH_aarch64_unknown_linux_ohos = None
TARGET_CMAKE_PREFIX_PATH = None
CMAKE_PREFIX_PATH = None
CMAKE_aarch64-unknown-linux-ohos = None
CMAKE_aarch64_unknown_linux_ohos = None
TARGET_CMAKE = None
CMAKE = None
running: cd "/root/rust/build/aarch64-unknown-linux-ohos/native/sanitizers/build" && CMAKE_PREFIX_PATH="" DESTDIR="" "cmake" "/root/rust/src/llvm-project/compiler-rt" "-G" "Ninja" "-DCMAKE_C_COMPILER_TARGET=aarch64-unknown-linux-ohos" "-DCOMPILER_RT_BUILD_BUILTINS=OFF" "-DCOMPILER_RT_BUILD_CRT=OFF" "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF" "-DCOMPILER_RT_BUILD_PROFILE=OFF" "-DCOMPILER_RT_BUILD_SANITIZERS=ON" "-DCOMPILER_RT_BUILD_XRAY=OFF" "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON" "-DCOMPILER_RT_USE_LIBCXX=OFF" "-DLLVM_CONFIG_PATH=/root/rust/build/x86_64-unknown-linux-gnu/llvm/bin/llvm-config" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_CROSSCOMPILING=True" "-DCMAKE_SYSTEM_NAME=Linux" "-DCMAKE_C_COMPILER=/usr/local/bin/aarch64-unknown-linux-ohos-clang.sh" "-DCMAKE_CXX_COMPILER=/usr/local/bin/aarch64-unknown-linux-ohos-clang++.sh" "-DCMAKE_ASM_COMPILER=/usr/local/bin/aarch64-unknown-linux-ohos-clang.sh" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-ohos" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-ohos" "-DCMAKE_AR=/opt/ohos-sdk/native/llvm/bin/llvm-ar" "-DCMAKE_SHARED_LINKER_FLAGS=" "-DCMAKE_MODULE_LINKER_FLAGS=" "-DCMAKE_EXE_LINKER_FLAGS=" "-DCMAKE_INSTALL_PREFIX=/root/rust/build/aarch64-unknown-linux-ohos/native/sanitizers" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-ohos" "-DCMAKE_BUILD_TYPE=Release"
CMake Deprecation Warning at /root/rust/src/llvm-project/cmake/Modules/CMakePolicy.cmake:6 (cmake_policy):
  The OLD behavior for policy CMP0114 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:12 (include)


CMake Deprecation Warning at /root/rust/src/llvm-project/cmake/Modules/CMakePolicy.cmake:11 (cmake_policy):
  The OLD behavior for policy CMP0116 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
  CMakeLists.txt:12 (include)


CMake Warning at cmake/Modules/CompilerRTUtils.cmake:290 (message):
  LLVM_CONFIG_PATH is deprecated, please use LLVM_CMAKE_DIR instead
Call Stack (most recent call first):
  CMakeLists.txt:105 (load_llvm_config)


CMake Warning at cmake/Modules/CompilerRTUtils.cmake:335 (message):
  LLVMTestingSupport not found in LLVM_AVAILABLE_LIBS
Call Stack (most recent call first):
  CMakeLists.txt:105 (load_llvm_config)


-- LLVM_MAIN_SRC_DIR: "/root/rust/src/llvm-project/llvm"
-- cmake c compiler target: aarch64-unknown-linux-ohos
-- Compiler-RT supported architectures: aarch64
CMake Error at lib/scudo/standalone/CMakeLists.txt:167 (message):
  No suitable unwinder library


-- Configuring incomplete, errors occurred!

I'm not particularly sure, but It should be automatically getting it from native/llvm/lib/aarch64-linux-ohos/libunwind.a ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the LLVM config, I think you need to pass COMPILER_RT_USE_BUILTINS_LIBRARY=ON to LLVM's cmake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the LLVM config, I think you need to pass COMPILER_RT_USE_BUILTINS_LIBRARY=ON to LLVM's cmake.

yes, very appreciae, it does works.

@rustbot
Copy link
Collaborator

rustbot commented Feb 24, 2025

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

The Miri subtree was changed

cc @rust-lang/miri

@LuuuXXX LuuuXXX force-pushed the promote-ohos-with-host-tools branch from 42df98f to 494f28d Compare February 24, 2025 03:44
@rust-log-analyzer

This comment has been minimized.

@LuuuXXX LuuuXXX force-pushed the promote-ohos-with-host-tools branch 2 times, most recently from d9f8e75 to 088ed36 Compare February 24, 2025 05:26
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 25, 2025

☔ The latest upstream changes (presumably #135726) made this pull request unmergeable. Please resolve the merge conflicts.

@LuuuXXX LuuuXXX changed the title Promote ohos targets to tier2 with host tools. [WIP] Promote ohos targets to tier2 with host tools. Feb 25, 2025
@LuuuXXX LuuuXXX force-pushed the promote-ohos-with-host-tools branch 2 times, most recently from 6e2d47f to 75bdb2f Compare February 25, 2025 06:27
@bors
Copy link
Contributor

bors commented Mar 5, 2025

⌛ Trying commit 23adb46 with merge 77ad712...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 5, 2025
…, r=<try>

Promote ohos targets to tier2 with host tools.

### What does this PR try to resolve?

Try to promote the following [[Tier 2 without Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools) targets to [[Tier 2 with Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools):

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
- `x86_64-unknown-linux-ohos`

### More Information?

see MCP: rust-lang/compiler-team#811

### Blockage to be solved?

- [x] Submit an MCP
- [x] Submit code of promote ohos targets
- [x] Resolve related dependencies (`measureme`)

The modified code of the measureme has been merged (see rust-lang/measureme#238). [done]
The new version will was released (rust-lang/measureme#240). [done]

try-job: dist-ohos
@jieyouxu
Copy link
Member

jieyouxu commented Mar 5, 2025

@bors r- (in case try job somehow gets promoted to full merge)

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Mar 5, 2025

💔 Test failed - checks-actions

@jieyouxu
Copy link
Member

jieyouxu commented Mar 5, 2025

No space left on device. You may wish to talk to infra over at https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra about a larger runner for this?

@LuuuXXX LuuuXXX force-pushed the promote-ohos-with-host-tools branch 2 times, most recently from 6082516 to 1b31525 Compare March 6, 2025 12:30
@LuuuXXX LuuuXXX force-pushed the promote-ohos-with-host-tools branch from 1b31525 to 4cd350f Compare March 6, 2025 12:35
@Amanieu
Copy link
Member

Amanieu commented Mar 6, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 6, 2025
…, r=<try>

Promote ohos targets to tier2 with host tools.

### What does this PR try to resolve?

Try to promote the following [[Tier 2 without Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-without-host-tools) targets to [[Tier 2 with Host Tools](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools)](https://doc.rust-lang.org/rustc/platform-support.html#tier-2-with-host-tools):

- `aarch64-unknown-linux-ohos`
- `armv7-unknown-linux-ohos`
- `x86_64-unknown-linux-ohos`

### More Information?

see MCP: rust-lang/compiler-team#811

### Blockage to be solved?

- [x] Submit an MCP
- [x] Submit code of promote ohos targets
- [x] Resolve related dependencies (`measureme`)

The modified code of the measureme has been merged (see rust-lang/measureme#238). [done]
The new version will was released (rust-lang/measureme#240). [done]

try-job: dist-ohos
@bors
Copy link
Contributor

bors commented Mar 6, 2025

⌛ Trying commit 4cd350f with merge 4f4ed10...

@bors
Copy link
Contributor

bors commented Mar 7, 2025

☀️ Try build successful - checks-actions
Build commit: 4f4ed10 (4f4ed103bd2aef1c38c7b609f2aab272123a8b2a)

@LuuuXXX LuuuXXX requested a review from Amanieu March 11, 2025 01:06
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 11, 2025
@LuuuXXX
Copy link
Contributor Author

LuuuXXX commented Mar 13, 2025

The check should have passed. Maybe we can merge it?

@Amanieu
Copy link
Member

Amanieu commented Mar 16, 2025

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2025

📌 Commit 4cd350f has been approved by Amanieu

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 16, 2025
@bors
Copy link
Contributor

bors commented Mar 16, 2025

⌛ Testing commit 4cd350f with merge 227690a...

@bors
Copy link
Contributor

bors commented Mar 16, 2025

☀️ Test successful - checks-actions
Approved by: Amanieu
Pushing 227690a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 16, 2025
@bors bors merged commit 227690a into rust-lang:master Mar 16, 2025
7 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 16, 2025
Copy link

This is an experimental post-merge analysis report. You can ignore it.

Post-merge report

Comparing 8b87fef (base) -> 227690a (this PR)

Test differences

No test diffs found

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (227690a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary -1.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.8% [-1.8%, -1.8%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -0.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-3.0%, -2.2%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 775.103s -> 775.741s (0.08%)
Artifact size: 365.12 MiB -> 365.10 MiB (-0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants