openharmony_ci 8bb9185874 !8 merge master into master
link-cplusplus新增bundle.json部件化

Created-by: dragonswordy
Commit-by: ljy9810
Merged-by: openharmony_ci
Description: ### 一、内容说明(相关的Issue)
https://gitcode.com/openharmony/third_party_rust_autocfg/issues/3


### 二、建议测试周期和提测地址  
  建议测试完成时间:xxxx.xx.xx  
  投产上线时间:xxxx.xx.xx  
  提测地址:CI环境/压测环境  
  测试账号:  

### 三、变更内容
  * 3.1 关联PR列表

  * 3.2 数据库和部署说明  
    1. 常规更新 
    2. 重启unicorn
    3. 重启sidekiq
    4. 迁移任务:是否有迁移任务,没有写 "无"
    5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无"

  * 3.4 其他技术优化内容(做了什么,变更了什么)
    - 重构了 xxxx 代码
    - xxxx 算法优化


  * 3.5 废弃通知(什么字段、方法弃用?)



  * 3.6  后向不兼容变更(是否有无法向后兼容的变更?)


  
### 四、研发自测点(自测哪些?冒烟用例全部自测?)
  自测测试结论:


### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方)
  检查点:

| 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 |
|------|------------|----------|---------------|
| xxx  | 否          | 需要       | 不需要           |
|      |            |          |               |

  接口测试:

  性能测试:

  并发测试:

  其他:



See merge request: openharmony/third_party_rust_link-cplusplus!8
2025-12-31 22:04:43 +08:00
2025-11-19 16:10:04 +08:00
2025-11-19 16:10:04 +08:00
2025-11-19 16:10:04 +08:00
2025-12-31 22:04:43 +08:00
2025-11-19 16:10:04 +08:00
2025-11-19 16:10:04 +08:00
2025-11-19 16:10:04 +08:00
2020-01-24 14:39:54 -08:00
2025-11-19 16:10:04 +08:00
2025-11-19 16:10:04 +08:00

-lstdc++ or -lc++

github crates.io docs.rs build status

This crate exists for the purpose of passing -lstdc++ or -lc++ to the linker, while making it possible for an application to make that choice on behalf of its library dependencies.

Without this crate, a library would need to:

  • pick one or the other to link, with no way for downstream applications to override the choice;
  • or link neither and require an explicit link flag provided by downstream applications even if they would be fine with a default choice;

neither of which are good experiences.


Options

An application or library that is fine with either of libstdc++ or libc++ being linked, whichever is the platform's default, should use the following in Cargo.toml:

[dependencies]
link-cplusplus = "1"

An application that wants a particular one or the other linked should use:

[dependencies]
link-cplusplus = { version = "1", features = ["libstdc++"] }

# or

link-cplusplus = { version = "1", features = ["libc++"] }

An application that wants to handle its own more complicated logic for link flags from its build script can make this crate do nothing by using:

[dependencies]
link-cplusplus = { version = "1", features = ["nothing"] }

Lastly, make sure to add an explicit extern crate dependency to your crate root, since the link-cplusplus crate will be otherwise unused and its link flags dropped.

// src/lib.rs

extern crate link_cplusplus;

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
S
Description
提供与 C++ 代码链接的支持。 | A Rust library that provides support for linking with C++ code.
Readme 506 KiB
Languages
Rust 96.5%
C++ 3.5%