Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-mesa: Commit

external/mesa


Commit MetaInfo

Révision4278458146582b6c12292f7e6be560aa126ad4f5 (tree)
l'heure2019-07-05 17:27:22
AuteurChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Message de Log

android: vulkan/util: fix generating vk_enum_to_str.*

The gen_enum_to_str.py generates vk_enum_to_str.c and its header at once.
However, the makefiles incorrectly list both files parallel with the same
recipes. That means both two files may be generated simultaneously by two
processes. The generating files may be truncated by another process, as
shown below:

$ cd $OUT/obj/STATIC_LIBRARIES/libmesa_vulkan_util_intermediates/util
$ ls -l

-rw-rw-r-- 1 lh lh 193713 Jul 5 13:31 vk_enum_to_str.c
-rw-rw-r-- 1 lh lh 4609 Jul 5 13:31 vk_enum_to_str.d
-rw-rw-r-- 1 lh lh 0 Jul 5 16:21 vk_enum_to_str.h

Let one file depends on the other with empty recipe to avoid the issue.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>

Change Summary

Modification

--- a/src/vulkan/Android.mk
+++ b/src/vulkan/Android.mk
@@ -46,14 +46,16 @@ LOCAL_SRC_FILES := $(VULKAN_UTIL_FILES) $(VULKAN_WSI_FILES)
4646
4747 vulkan_api_xml = $(MESA_TOP)/src/vulkan/registry/vk.xml
4848
49-$(LOCAL_GENERATED_SOURCES): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py \
49+$(firstword $(LOCAL_GENERATED_SOURCES)): $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py \
5050 $(vulkan_api_xml)
5151 @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
5252 @mkdir -p $(dir $@)
53- $(hide) $(MESA_PYTHON2) $(MESA_TOP)/src/vulkan/util/gen_enum_to_str.py \
53+ $(hide) $(MESA_PYTHON2) $< \
5454 --xml $(vulkan_api_xml) \
5555 --outdir $(dir $@)
5656
57+$(lastword $(LOCAL_GENERATED_SOURCES)): $(firstword $(LOCAL_GENERATED_SOURCES))
58+
5759 LOCAL_EXPORT_C_INCLUDE_DIRS := \
5860 $(intermediates)
5961
Afficher sur ancien navigateur de dépôt.