Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 1 | From fdad2906512d4c1319e55ded79f59820cb818670 Mon Sep 17 00:00:00 2001 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 2 | From: Jackeagle <jackeagle102@gmail.com> |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 3 | Date: Mon, 3 Dec 2018 10:57:02 -0500 |
| 4 | Subject: [PATCH 7/9] Revert "vendor/bliss: Dynamically generate kernel headers |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 5 | using bliss generator" |
| 6 | |
| 7 | This reverts commit e0831af9a803dc2bdd1d203d93c3e3ce9b8e120a. |
| 8 | --- |
| 9 | build/soong/Android.bp | 22 ---------------------- |
| 10 | build/soong/generator/generator.go | 5 +---- |
| 11 | build/soong/generator/variables.go | 28 ---------------------------- |
| 12 | config/BoardConfigBliss.mk | 1 - |
| 13 | config/BoardConfigSoong.mk | 18 ------------------ |
| 14 | 5 files changed, 1 insertion(+), 73 deletions(-) |
| 15 | delete mode 100644 build/soong/generator/variables.go |
| 16 | delete mode 100644 config/BoardConfigSoong.mk |
| 17 | |
| 18 | diff --git a/build/soong/Android.bp b/build/soong/Android.bp |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 19 | index 3addbe36..45a4ab72 100644 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 20 | --- a/build/soong/Android.bp |
| 21 | +++ b/build/soong/Android.bp |
| 22 | @@ -18,28 +18,6 @@ bootstrap_go_package { |
| 23 | ], |
| 24 | srcs: [ |
| 25 | "generator/generator.go", |
| 26 | - "generator/variables.go", |
| 27 | ], |
| 28 | pluginFor: ["soong_build"], |
| 29 | } |
| 30 | - |
| 31 | -bliss_generator { |
| 32 | - name: "generated_kernel_includes", |
| 33 | - |
| 34 | - // The headers make command |
| 35 | - cmd: "make $(KERNEL_MAKE_FLAGS) -C $(TARGET_KERNEL_SOURCE) O=$(genDir) ARCH=$(KERNEL_ARCH) $(KERNEL_CROSS_COMPILE) headers_install", |
| 36 | - |
| 37 | - // Directories that can be imported by a cc_* module generated_headers property |
| 38 | - export_include_dirs: ["usr/include"], |
| 39 | - |
| 40 | - // Sources for dependency tracking |
| 41 | - dep_root: "$(TARGET_KERNEL_SOURCE)", |
| 42 | - dep_files: [ "Makefile", "include/**/*", "arch/$(KERNEL_ARCH)/include/**/*"], |
| 43 | -} |
| 44 | - |
| 45 | -cc_library_headers { |
| 46 | - name: "generated_kernel_headers", |
| 47 | - generated_headers: ["generated_kernel_includes"], |
| 48 | - export_generated_headers: ["generated_kernel_includes"], |
| 49 | - vendor_available: true, |
| 50 | -} |
| 51 | diff --git a/build/soong/generator/generator.go b/build/soong/generator/generator.go |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 52 | index ffaece32..b14a19c5 100644 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 53 | --- a/build/soong/generator/generator.go |
| 54 | +++ b/build/soong/generator/generator.go |
| 55 | @@ -213,13 +213,10 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
| 56 | depRoot := String(g.properties.Dep_root) |
| 57 | if depRoot == "" { |
| 58 | depRoot = ctx.ModuleDir() |
| 59 | - } else { |
| 60 | - depRoot = blissExpandVariables(ctx, depRoot) |
| 61 | } |
| 62 | |
| 63 | // Glob dep_files property |
| 64 | for _, dep_file := range g.properties.Dep_files { |
| 65 | - dep_file = blissExpandVariables(ctx, dep_file) |
| 66 | globPath := filepath.Join(depRoot, dep_file) |
| 67 | paths, err := ctx.GlobWithDeps(globPath, nil) |
| 68 | if err != nil { |
| 69 | @@ -231,7 +228,7 @@ func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) { |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | - cmd := blissExpandVariables(ctx, String(g.properties.Cmd)) |
| 74 | + cmd := String(g.properties.Cmd) |
| 75 | |
| 76 | rawCommand, err := android.Expand(cmd, func(name string) (string, error) { |
| 77 | switch name { |
| 78 | diff --git a/build/soong/generator/variables.go b/build/soong/generator/variables.go |
| 79 | deleted file mode 100644 |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 80 | index 3e633ffb..00000000 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 81 | --- a/build/soong/generator/variables.go |
| 82 | +++ /dev/null |
| 83 | @@ -1,28 +0,0 @@ |
| 84 | -package generator |
| 85 | - |
| 86 | -import ( |
| 87 | - "fmt" |
| 88 | - |
| 89 | - "android/soong/android" |
| 90 | -) |
| 91 | - |
| 92 | -func blissExpandVariables(ctx android.ModuleContext, in string) string { |
| 93 | - blissVars := ctx.Config().VendorConfig("blissVarsPlugin") |
| 94 | - |
| 95 | - out, err := android.Expand(in, func(name string) (string, error) { |
| 96 | - if blissVars.IsSet(name) { |
| 97 | - return blissVars.String(name), nil |
| 98 | - } |
| 99 | - // This variable is not for us, restore what the original |
| 100 | - // variable string will have looked like for an Expand |
| 101 | - // that comes later. |
| 102 | - return fmt.Sprintf("$(%s)", name), nil |
| 103 | - }) |
| 104 | - |
| 105 | - if err != nil { |
| 106 | - ctx.PropertyErrorf("%s: %s", in, err.Error()) |
| 107 | - return "" |
| 108 | - } |
| 109 | - |
| 110 | - return out |
| 111 | -} |
| 112 | diff --git a/config/BoardConfigBliss.mk b/config/BoardConfigBliss.mk |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 113 | index 7ccae1d4..e38938b0 100644 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 114 | --- a/config/BoardConfigBliss.mk |
| 115 | +++ b/config/BoardConfigBliss.mk |
| 116 | @@ -9,7 +9,6 @@ ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
| 117 | endif |
| 118 | |
| 119 | include vendor/bliss/config/BoardConfigKernel.mk |
| 120 | -include vendor/lineage/config/BoardConfigSoong.mk |
| 121 | |
| 122 | ifeq ($(BOARD_USES_QCOM_HARDWARE),true) |
| 123 | include vendor/bliss/config/BoardConfigQcom.mk |
| 124 | diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk |
| 125 | deleted file mode 100644 |
Jackeagle | a3ae16b | 2018-12-04 11:30:49 -0500 | [diff] [blame^] | 126 | index 35d7893c..00000000 |
Jackeagle | d3ba228 | 2018-11-17 20:49:22 -0700 | [diff] [blame] | 127 | --- a/config/BoardConfigSoong.mk |
| 128 | +++ /dev/null |
| 129 | @@ -1,18 +0,0 @@ |
| 130 | -# Add variables that we wish to make available to soong here. |
| 131 | -EXPORT_TO_SOONG := \ |
| 132 | - KERNEL_ARCH \ |
| 133 | - KERNEL_CROSS_COMPILE \ |
| 134 | - KERNEL_MAKE_FLAGS \ |
| 135 | - TARGET_KERNEL_CONFIG \ |
| 136 | - TARGET_KERNEL_SOURCE |
| 137 | - |
| 138 | -SOONG_CONFIG_NAMESPACES += blissVarsPlugin |
| 139 | - |
| 140 | -SOONG_CONFIG_blissVarsPlugin := |
| 141 | - |
| 142 | -define addVar |
| 143 | - SOONG_CONFIG_blissVarsPlugin += $(1) |
| 144 | - SOONG_CONFIG_blissVarsPlugin_$(1) := $$(subst ",\",$$($1)) |
| 145 | -endef |
| 146 | - |
| 147 | -$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) |
| 148 | -- |
| 149 | 2.17.1 |
| 150 | |