Skip to content
Snippets Groups Projects
Commit 4de682dc authored by Esben Haabendal's avatar Esben Haabendal
Browse files

openharmony-standard: Use flex and bison tools from recipe-sysroot-native


Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent 5a869aca
No related branches found
No related tags found
1 merge request!26Various changes in preparation for integration with meta-oniro-core
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
Patch for //third_party/selinux git repository of OpenHarmony 3.1 codebase.
This allows overriding the path to flex and bison tools using GN arguments.
Signed-off-by: Esben Haabendal <esben.haabendal@huawei.com>
Upstream-Status: Pending
diff --git a/BUILD.gn b/BUILD.gn
index 34616600fac4..a8fb10dbc96c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -20,8 +20,13 @@ SECILC_ROOT_DIR = "//third_party/selinux/secilc"
LIBFTS_ROOT_DIR = "//third_party/FreeBSD"
LIBPCRE2_ROOT_DIR = "//third_party/pcre2"
+declare_args() {
+ flex_path = "/usr/bin/flex"
+ bison_path = "/usr/bin/bison"
+}
+
ohos_shared_library("libsepol") {
- exec_script("/usr/bin/flex",
+ exec_script(flex_path,
[
"-o",
rebase_path("libsepol/cil/src/cil_lexer.c"),
@@ -314,7 +319,7 @@ ohos_executable("getpidcon") {
}
ohos_executable("checkpolicy") {
- exec_script("/usr/bin/bison",
+ exec_script(bison_path,
[
"-y",
"-d",
@@ -323,7 +328,7 @@ ohos_executable("checkpolicy") {
rebase_path("checkpolicy/y.tab.c"),
],
"")
- exec_script("/usr/bin/flex",
+ exec_script(flex_path,
[
"-o",
rebase_path("checkpolicy/policy_scan.c"),
...@@ -65,6 +65,7 @@ SRC_URI += "file://ace_engine-openssl-legacy-provider.patch;patchdir=${S}/founda ...@@ -65,6 +65,7 @@ SRC_URI += "file://ace_engine-openssl-legacy-provider.patch;patchdir=${S}/founda
SRC_URI += "file://developtools_hdc_standard-gcc.patch;patchdir=${S}/developtools/hdc_standard" SRC_URI += "file://developtools_hdc_standard-gcc.patch;patchdir=${S}/developtools/hdc_standard"
SRC_URI += "file://foundation_graphic_standard-hdi-display-layer.patch;patchdir=${S}/foundation/graphic/standard" SRC_URI += "file://foundation_graphic_standard-hdi-display-layer.patch;patchdir=${S}/foundation/graphic/standard"
SRC_URI += "file://third_party_weston-hdi-display-layer.patch;patchdir=${S}/third_party/weston" SRC_URI += "file://third_party_weston-hdi-display-layer.patch;patchdir=${S}/third_party/weston"
SRC_URI += "file://third_party_selinux-flex-bison-path.patch;patchdir=${S}/third_party/selinux"
SRC_URI += "file://features.json;subdir=${OHOS_BUILD_CONFIGS_DIR}" SRC_URI += "file://features.json;subdir=${OHOS_BUILD_CONFIGS_DIR}"
# Patch to allow /system/profile and /system/usr to be symlinks to /usr/lib/openharmony # Patch to allow /system/profile and /system/usr to be symlinks to /usr/lib/openharmony
...@@ -111,6 +112,8 @@ GN_ARGS += 'treat_warnings_as_errors=false' ...@@ -111,6 +112,8 @@ GN_ARGS += 'treat_warnings_as_errors=false'
GN_ARGS += 'node_path="${RECIPE_SYSROOT_NATIVE}/usr/bin"' GN_ARGS += 'node_path="${RECIPE_SYSROOT_NATIVE}/usr/bin"'
GN_ARGS += 'host_toolchain="//oniro:clang_x64"' GN_ARGS += 'host_toolchain="//oniro:clang_x64"'
GN_ARGS += 'install_oniro_third_party=false' GN_ARGS += 'install_oniro_third_party=false'
GN_ARGS += 'flex_path="${RECIPE_SYSROOT_NATIVE}/usr/bin/flex"'
GN_ARGS += 'bison_path="${RECIPE_SYSROOT_NATIVE}/usr/bin/bison"'
# OpenHarmony unit tests are statically linked and therefore not stripped # OpenHarmony unit tests are statically linked and therefore not stripped
# binaries sum up to almost 80GB which makes it difficult to build OpenHarmony # binaries sum up to almost 80GB which makes it difficult to build OpenHarmony
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment