Re: [android-building] Replacement for BUILD_BROKEN_PHONY and phony-rebuild in android R

2020-08-10 Thread 'Dan Willemsen' via Android Building
>
> 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  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 android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> 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 android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/786689cd-9816-454d-ba1f-bead4944ce3fo%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHdnNEArhZ-NoDSwrmmncaacN8WVFDeekUPYj%3DmUmk4rYiQ%40mail.gmail.com.


Re: [android-building] Add build tag from a blueprint

2020-08-10 Thread 'Dan Willemsen' via Android Building
Huh, I hadn't even realized that was customizable. In any case, we'd expect
global configuration like this to happen in the global/device configuration
part of the build (build/make/core/config.mk / product makefiles /
BoardConfig.mk, and things they include), not happen in Android.mk /
Android.bp files (which define things that may not even be used by the
current build). What's your use case for setting this in an Android.mk /
Android.bp file?

- Dan

On Mon, Aug 10, 2020 at 1:11 PM Simon Williams <
simondavidwilliam...@gmail.com> wrote:

> Using Android.mk, I'm able to add a new Build.TAG value by using
> BUILD_VERSION_TAGS += my-tag
>
> Is it possible to do this from an Android.bp soong BluePrint file?
>
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-building@googlegroups.com
> To unsubscribe from this group, send email to
> android-building+unsubscr...@googlegroups.com
> 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 android-building+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/android-building/eb6940ac-2a71-4b77-9a4d-eea3ac02d587n%40googlegroups.com
> 
> .
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/CALQgHd%3D6WK6XnuVq_u11m1axXjrbm6bf8Uk0%2Bi3L15r8rZGAbQ%40mail.gmail.com.


[android-building] Add build tag from a blueprint

2020-08-10 Thread Simon Williams
Using Android.mk, I'm able to add a new Build.TAG value by using
BUILD_VERSION_TAGS += my-tag

Is it possible to do this from an Android.bp soong BluePrint file?

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to android-building@googlegroups.com
To unsubscribe from this group, send email to
android-building+unsubscr...@googlegroups.com
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 android-building+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-building/eb6940ac-2a71-4b77-9a4d-eea3ac02d587n%40googlegroups.com.