Skip to content

use config seperate librs/infra string functions#355

Closed
zhanghe-vivo wants to merge 0 commit intovivoblueos:mainfrom
zhanghe-vivo:zhanghe_missing_sd
Closed

use config seperate librs/infra string functions#355
zhanghe-vivo wants to merge 0 commit intovivoblueos:mainfrom
zhanghe-vivo:zhanghe_missing_sd

Conversation

@zhanghe-vivo
Copy link
Copy Markdown
Contributor

@zhanghe-vivo zhanghe-vivo commented Mar 10, 2026

add some missing string functions, but some of them reuse same #[no_demagle] posix implementation , they conflict with infra implementations, now add an config object in GN as an solution

vivoblueos/librs#28

Comment thread infra/BUILD.gn Outdated
deps = shared_deps
}

config("disable_string_exports") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it possible to set in Kconfig?

Comment thread infra/src/string.rs Outdated

// used by core/src/slice/cmp.rs
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/memcmp.html>.
#[cfg(not(disable_infra_c_string_exports))]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This function is already weak-linked. Why do we still need to isolate it based on cfg?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i can try to let all of them use weak-linked attributes, let linker choose one(should be order , maybe choose the first occurence), therefore, also don't need change these build.gn files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants