> > but in my case this rebuilding is required . > I think this is where we're disconnected. Forcing rebuilds means that incremental builds will nearly never be as fast as they should be, as the entire tree starting from that phony would need to be rebuilt even if you weren't touching anything related to the kernel. Instead, we'd much prefer that the rule depended on what it uses, so it'll only be re-executed when necessary. That list of dependencies may end up being a significant portion of the kernel tree, but that's still better than every build.
This also gets more important as we improve per-action sandboxing to get better incremental builds and remote execution / cross-machine caching of build actions. We're not there yet, but that's the direction we'd like to be heading. - Dan On Wed, Jul 29, 2020 at 9:08 AM Sumit Kumar <[email protected]> wrote: > hi all, > i am trying to build android R but getting the following error in the > kernel makefile > * kernel/exynos/AndroidKernel.mk:155: error: writing to readonly > directory: > "/data/home/sumkumar/work/workspace/R/out/../out/target/product/**/obj/KERNEL_OBJ/arch/arm64/boot/Image"* > this was handled in Android Q by using the flag > "BUILD_BROKEN_PHONY_TARGETS=true" but in R this is depreciated hence cannot > use the same. > > after looking at following link given for phony rules changes from > google for android R > > https://android.googlesource.com/platform/build/+/master/Changes.md#phony_targets > > i have updated my Makefile as follows by removing the "../" in the > erronous path and past the previous error , > * #KERNEL_OUT ?= $(if $(filter /% > ~%,$(TARGET_OUT_INTERMEDIATES)),,$(realpath > $(OUT_DIR))/../)$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ* > *KERNEL_OUT ?= $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ* > > but now i am getting errors with phony-rebuild as mentioned below > *kernel/exynos/AndroidKernel.mk:139: error: real file > "out/target/product/**/obj/KERNEL_OBJ/.config" depends on PHONY target > "phony-rebuild"* > *14:21:04 ckati failed with: exit status 1* > > > > i understood as phony targets are always dirty hence every file will be > rebuild which depends on that phony, but in my case this rebuilding is > required . > Attaching a snap of the file depicting the same > > KERNEL_CONFIG := $(KERNEL_OUT)/.config > > KERNEL_CONFIG := $(KERNEL_OUT)/.config > > > > .PHONY: phony-rebuild > > > > > > $(KERNEL_CONFIG): phony-rebuild > > $(show) echo "make $(KERNEL_DEFCONFIG)" > > $(MAKE_CONFIG_CMD) > $(info MAKE_CONFIG_CMD is $(MAKE_CONFIG_CMD)) > > Please let me know if there is any way to avoid using phony-rebuild and > replace it with an alternate mechanism. > > Regards, > > -- > -- > You received this message because you are subscribed to the "Android > Building" mailing list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-building?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Android Building" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/android-building/786689cd-9816-454d-ba1f-bead4944ce3fo%40googlegroups.com > <https://groups.google.com/d/msgid/android-building/786689cd-9816-454d-ba1f-bead4944ce3fo%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/CALQgHdnNEArhZ-NoDSwrmmncaacN8WVFDeekUPYj%3DmUmk4rYiQ%40mail.gmail.com.
