mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2025-03-01 08:57:43 +00:00
!7199 Enable PGO building for graphic_2d and outline-atomics for pc product.
Merge pull request !7199 from 严谨/master
This commit is contained in:
commit
fb9f71fd91
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
]
|
||||
|
@ -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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user