diff options
author | Chidera Olibie <colibie@google.com> | 2024-02-12 20:24:53 +0000 |
---|---|---|
committer | Chidera Olibie <colibie@google.com> | 2024-02-12 21:31:58 +0000 |
commit | 268983f649b955eefc84936c41f7c3c7bc7d09e1 (patch) | |
tree | 65066726d1a101dc790aaa56f32c821a284641c9 | |
parent | d7ef71437d609b56a52e1a7084d3d4e0e57a8b5f (diff) | |
download | cronet-268983f649b955eefc84936c41f7c3c7bc7d09e1.tar.gz |
Cronet 121.0.6167.71: export include_dirs for buildflags
soong generates each of these header files in a specific
target-name based directory so we need to tell the compiler
to look for the files in these directories.
Bug: b/322154153
Change-Id: I48406a9340da34dc7e5f3b0f05e8187e2ac7a892
-rw-r--r-- | android/tools/gn2bp/Android.bp.swp | 32 | ||||
-rwxr-xr-x | android/tools/gn2bp/gen_android_bp | 59 |
2 files changed, 90 insertions, 1 deletions
diff --git a/android/tools/gn2bp/Android.bp.swp b/android/tools/gn2bp/Android.bp.swp index 66112d32e..ea67cb74b 100644 --- a/android/tools/gn2bp/Android.bp.swp +++ b/android/tools/gn2bp/Android.bp.swp @@ -966,6 +966,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/chromecast_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -990,6 +993,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/chromecast_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1013,6 +1019,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/chromeos_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1037,6 +1046,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/chromeos_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1099,6 +1111,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1174,6 +1189,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1236,6 +1254,10 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h", ], + export_include_dirs: [ + ".", + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1311,6 +1333,10 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h", ], + export_include_dirs: [ + ".", + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1543,6 +1569,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/raw_ptr_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], @@ -1567,6 +1596,9 @@ cc_genrule { out: [ "base/allocator/partition_allocator/src/partition_alloc/raw_ptr_buildflags.h", ], + export_include_dirs: [ + "base/allocator/partition_allocator/src/", + ], tool_files: [ "build/write_buildflag_header.py", ], diff --git a/android/tools/gn2bp/gen_android_bp b/android/tools/gn2bp/gen_android_bp index d1a55bf74..f756ce17c 100755 --- a/android/tools/gn2bp/gen_android_bp +++ b/android/tools/gn2bp/gen_android_bp @@ -218,7 +218,64 @@ additional_args = { ('cflags', { "-Wno-incompatible-pointer-types-discards-qualifiers", }) - ] + ], + # TODO(b/324872305): Remove when gn desc expands public_configs and update code to propagate the + # include_dir from the public_configs + # We had to add the export_include_dirs for each target because soong generates each header + # file in a specific directory named after the target. + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromecast_buildflags__testing': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_chromeos_buildflags__testing': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_debugging_buildflags__testing': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags': [ + ('export_include_dirs', { + ".", + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_partition_alloc_buildflags__testing': [ + ('export_include_dirs', { + ".", + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + 'cronet_aml_base_allocator_partition_allocator_src_partition_alloc_raw_ptr_buildflags__testing': [ + ('export_include_dirs', { + "base/allocator/partition_allocator/src/", + }) + ], + # end export_include_dir. } def always_disable(module, arch): |