!7199 Enable PGO building for graphic_2d and outline-atomics for pc product.

Merge pull request !7199 from 严谨/master
This commit is contained in:
openharmony_ci 2023-12-06 02:10:58 +00:00 committed by Gitee
commit fb9f71fd91
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 48 additions and 6 deletions

View File

@ -25,6 +25,9 @@
],
"adapted_system_type": [ "standard" ],
"features": [
"graphic_2d_feature_product",
"graphic_2d_feature_enable_pgo",
"graphic_2d_feature_pgo_path",
"graphic_2d_feature_bootanimation_enable",
"graphic_2d_feature_ace_enable_gpu",
"graphic_2d_feature_rs_enable_eglimage",

View File

@ -12,6 +12,9 @@
# limitations under the License.
declare_args() {
graphic_2d_feature_product = "default"
graphic_2d_feature_enable_pgo = false
graphic_2d_feature_pgo_path = ""
graphic_2d_feature_bootanimation_enable = true
graphic_2d_feature_ace_enable_gpu = true
graphic_2d_feature_color_gamut_enable = false

View File

@ -20,8 +20,6 @@ config("render_service_link_config") {
ldflags = [
"-Wl,--lto-O2",
"-Wl,-mllvm",
"-Wl,-import-instr-limit=5",
"-Wl,-mllvm",
"-Wl,-wholeprogramdevirt-check=fallback",
"-Wl,-Bsymbolic",
]
@ -51,6 +49,20 @@ ohos_shared_library("librender_service") {
cflags = [ "-flto=thin" ]
if (enhanced_opt) {
cflags += [ "-fwhole-program-vtables" ]
if (graphic_2d_feature_enable_pgo &&
graphic_2d_feature_product != "default") {
cflags += [
"-fprofile-use=" + rebase_path(
"${graphic_2d_feature_pgo_path}/librender_service.profdata",
root_build_dir),
"-Wno-error=backend-plugin",
"-Wno-profile-instr-out-of-date",
"-Wno-profile-instr-unprofiled",
]
}
if (graphic_2d_feature_product == "pc" && target_cpu == "arm64") {
cflags += [ "-moutline-atomics" ]
}
}
}

View File

@ -238,6 +238,20 @@ ohos_source_set("render_service_base_src") {
cflags += [ "-flto=thin" ]
if (enhanced_opt) {
cflags += [ "-fwhole-program-vtables" ]
if (graphic_2d_feature_enable_pgo &&
graphic_2d_feature_product != "default") {
cflags += [
"-fprofile-use=" + rebase_path(
"${graphic_2d_feature_pgo_path}/librender_service_base.profdata",
root_build_dir),
"-Wno-error=backend-plugin",
"-Wno-profile-instr-out-of-date",
"-Wno-profile-instr-unprofiled",
]
}
if (graphic_2d_feature_product == "pc" && target_cpu == "arm64") {
cflags += [ "-moutline-atomics" ]
}
}
}
@ -371,8 +385,6 @@ config("render_service_base_link_config") {
ldflags = [
"-Wl,--lto-O2",
"-Wl,-mllvm",
"-Wl,-import-instr-limit=5",
"-Wl,-mllvm",
"-Wl,-wholeprogramdevirt-check=fallback",
"-Wl,-Bsymbolic",
]

View File

@ -206,6 +206,20 @@ ohos_source_set("rosen_ohos_sources") {
cflags = [ "-flto=thin" ]
if (enhanced_opt) {
cflags += [ "-fwhole-program-vtables" ]
if (graphic_2d_feature_enable_pgo &&
graphic_2d_feature_product != "default") {
cflags += [
"-fprofile-use=" + rebase_path(
"${graphic_2d_feature_pgo_path}/librender_service_base.profdata",
root_build_dir),
"-Wno-error=backend-plugin",
"-Wno-profile-instr-out-of-date",
"-Wno-profile-instr-unprofiled",
]
}
if (graphic_2d_feature_product == "pc" && target_cpu == "arm64") {
cflags += [ "-moutline-atomics" ]
}
}
}

View File

@ -221,8 +221,6 @@ config("render_service_client_link_config") {
ldflags = [
"-Wl,--lto-O2",
"-Wl,-mllvm",
"-Wl,-import-instr-limit=5",
"-Wl,-mllvm",
"-Wl,-wholeprogramdevirt-check=fallback",
"-Wl,-Bsymbolic",
]