| From fdad2906512d4c1319e55ded79f59820cb818670 Mon Sep 17 00:00:00 2001 |
| From: Jackeagle <jackeagle102@gmail.com> |
| Date: Mon, 3 Dec 2018 10:57:02 -0500 |
| Subject: [PATCH 7/9] Revert "vendor/bliss: Dynamically generate kernel headers |
| using bliss generator" |
| |
| This reverts commit e0831af9a803dc2bdd1d203d93c3e3ce9b8e120a. |
| --- |
| build/soong/Android.bp | 22 ---------------------- |
| build/soong/generator/generator.go | 5 +---- |
| build/soong/generator/variables.go | 28 ---------------------------- |
| config/BoardConfigBliss.mk | 1 - |
| config/BoardConfigSoong.mk | 18 ------------------ |
| 5 files changed, 1 insertion(+), 73 deletions(-) |
| delete mode 100644 build/soong/generator/variables.go |
| delete mode 100644 config/BoardConfigSoong.mk |
| |
| diff --git a/build/soong/Android.bp b/build/soong/Android.bp |
| index 3addbe36..45a4ab72 100644 |
| --- a/build/soong/Android.bp |
| +++ b/build/soong/Android.bp |
| @@ -18,28 +18,6 @@ bootstrap_go_package { |
| ], |
| srcs: [ |
| "generator/generator.go", |
| - "generator/variables.go", |
| ], |
| pluginFor: ["soong_build"], |
| } |
| - |
| -bliss_generator { |
| - name: "generated_kernel_includes", |
| - |
| - // The headers make command |
| - cmd: "make $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install", |
| - |
| - // Directories that can be imported by a cc_* module generated_headers property |
| - export_include_dirs: ["usr/include"], |
| - |
| - // Sources for dependency tracking |
| - dep_root: "$(TARGET_KERNEL_SOURCE)", |
| - dep_files: [ "Makefile", "include/**/*", "arch/$(KERNEL_ARCH)/include/**/*"], |
| -} |
| - |
| -cc_library_headers { |
| - name: "generated_kernel_headers", |
| - generated_headers: ["generated_kernel_includes"], |
| - export_generated_headers: ["generated_kernel_includes"], |
| - vendor_available: true, |
| -} |
| diff --git a/build/soong/generator/generator.go b/build/soong/generator/generator.go |
| index ffaece32..b14a19c5 100644 |
| --- a/build/soong/generator/generator.go |
| +++ b/build/soong/generator/generator.go |
| @@ -213,13 +213,10 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
| depRoot := String(g.properties.Dep_root) |
| if depRoot == "" { |
| depRoot = ctx.ModuleDir() |
| - } else { |
| - depRoot = blissExpandVariables(ctx, depRoot) |
| } |
| |
| // Glob dep_files property |
| for _, dep_file := range g.properties.Dep_files { |
| - dep_file = blissExpandVariables(ctx, dep_file) |
| globPath := filepath.Join(depRoot, dep_file) |
| paths, err := ctx.GlobWithDeps(globPath, nil) |
| if err != nil { |
| @@ -231,7 +228,7 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
| } |
| } |
| |
| - cmd := blissExpandVariables(ctx, String(g.properties.Cmd)) |
| + cmd := String(g.properties.Cmd) |
| |
| rawCommand, err := android.Expand(cmd, func(name string) (string, error) { |
| switch name { |
| diff --git a/build/soong/generator/variables.go b/build/soong/generator/variables.go |
| deleted file mode 100644 |
| index 3e633ffb..00000000 |
| --- a/build/soong/generator/variables.go |
| +++ /dev/null |
| @@ -1,28 +0,0 @@ |
| -package generator |
| - |
| -import ( |
| - "fmt" |
| - |
| - "android/soong/android" |
| -) |
| - |
| -func blissExpandVariables(ctx android.ModuleContext, in string) string { |
| - blissVars := ctx.Config().VendorConfig("blissVarsPlugin") |
| - |
| - out, err := android.Expand(in, func(name string) (string, error) { |
| - if blissVars.IsSet(name) { |
| - return blissVars.String(name), nil |
| - } |
| - // This variable is not for us, restore what the original |
| - // variable string will have looked like for an Expand |
| - // that comes later. |
| - return fmt.Sprintf("$(%s)", name), nil |
| - }) |
| - |
| - if err != nil { |
| - ctx.PropertyErrorf("%s: %s", in, err.Error()) |
| - return "" |
| - } |
| - |
| - return out |
| -} |
| diff --git a/config/BoardConfigBliss.mk b/config/BoardConfigBliss.mk |
| index 7ccae1d4..e38938b0 100644 |
| --- a/config/BoardConfigBliss.mk |
| +++ b/config/BoardConfigBliss.mk |
| @@ -9,7 +9,6 @@ ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
| endif |
| |
| include vendor/bliss/config/BoardConfigKernel.mk |
| -include vendor/lineage/config/BoardConfigSoong.mk |
| |
| ifeq ($(BOARD_USES_QCOM_HARDWARE),true) |
| include vendor/bliss/config/BoardConfigQcom.mk |
| diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk |
| deleted file mode 100644 |
| index 35d7893c..00000000 |
| --- a/config/BoardConfigSoong.mk |
| +++ /dev/null |
| @@ -1,18 +0,0 @@ |
| -# Add variables that we wish to make available to soong here. |
| -EXPORT_TO_SOONG := \ |
| - KERNEL_ARCH \ |
| - KERNEL_CROSS_COMPILE \ |
| - KERNEL_MAKE_FLAGS \ |
| - TARGET_KERNEL_CONFIG \ |
| - TARGET_KERNEL_SOURCE |
| - |
| -SOONG_CONFIG_NAMESPACES += blissVarsPlugin |
| - |
| -SOONG_CONFIG_blissVarsPlugin := |
| - |
| -define addVar |
| - SOONG_CONFIG_blissVarsPlugin += $(1) |
| - SOONG_CONFIG_blissVarsPlugin_$(1) := $$(subst ",\",$$($1)) |
| -endef |
| - |
| -$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) |
| -- |
| 2.17.1 |
| |