when call COMMON_LUNCH_CHOICES in build?

962 views
Skip to first unread message

Bo YU

unread,
Mar 12, 2020, 11:59:05 AM3/12/20
to Android Building
Hi,
    please correct me if i understood wrong.
    In AOSP/build call chains,we know, `source aosp-src/build/envsetup.sh`, it will execute three shell functions firstly:

validate_current_shell
source_vendorsetup
addcompletions 
In my view, it does not affect the config list.especially source_vendorsetup:
But, if it does not source global var,eg,COMMON_LUNCH_CHOICES,
lunch->print_lunch_menu->get_build_var (COMMON_LUNCH_CHOICES)->soong/soong_ui.bash.
Although COMMON_LUNCH_CHOICES is defined in make/target/product/AndroidProducts.mk,
Can we call it directly without preparing read COMMON_LUNCH_CHOICES?
Thank you very much



Dan Willemsen

unread,
Mar 12, 2020, 1:13:21 PM3/12/20
to Android Building
I'm not entirely sure what you're asking, but I wouldn't expect most people to be using COMMON_LUNCH_CHOICES very often. That is only used for the lunch menu, which only shows up when you don't pass an argument to lunch, or pass a number (don't do that!). The expected flow would be to do something like:

 $ source build/envsetup.sh
 $ lunch aosp_crosshatch-eng
 $ m

None of those steps will use COMMON_LUNCH_CHOICES.

- Dan

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@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-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/dc791e87-4a9c-4501-bc1c-429843dbbb57%40googlegroups.com.

allowsh262

unread,
Mar 12, 2020, 1:21:41 PM3/12/20
to android-...@googlegroups.com
سؤال



مرسل من هاتف Samsung Galaxy الذكي.


-------- الرسالة الأصلية --------
من: Bo YU <tsu....@gmail.com>
التاريخ: ١٢‏/٣‏/٢٠٢٠ ٦:٥٩ م (GMT+03:00)
إلى: Android Building <android-...@googlegroups.com>
الموضوع: [android-building] when call COMMON_LUNCH_CHOICES in build?

Hi,
    please correct me if i understood wrong.
    In AOSP/build call chains,we know, `source aosp-src/build/envsetup.sh`, it will execute three shell functions ذ طمت غمزت جاو، firstly:

validate_current_shell
source_vendorsetup
addcompletions 
In my view, it does not affect the config list.especially source_vendorsetup:
But, if it does not source global var,eg,COMMON_LUNCH_CHOICES,
lunch->print_lunch_menu->get_build_var (COMMON_LUNCH_CHOICES)->soong/soong_ui.bash.
Although COMMON_LUNCH_CHOICES is defined in make/target/product/AndroidProducts.mk,
Can we call it directly without preparing read COMMON_LUNCH_CHOICES?
Thank you very much



Bo YU

unread,
Mar 12, 2020, 10:55:51 PM3/12/20
to Android Building
Thanks for  your reply,Dan
In fact, I want to know how to switch from makefile to soong in buliding stage exactly.
As you said, the commond ,`lunch aosp_crosshatch-eng` ,aosp_crosshatch-eng is $1 for lunch command in envsetup.sh.
But the next execute flow in that function :
`  local choices=($(TARGET_BUILD_APPS= get_build_var COMMON_LUNCH_CHOICES))`
Here we use COMMON_LUNCH_CHOICES again.Please note i did not want to edit ot use it directly.
In such case, can we call COMMON_LUNCH_CHOICES as if it was the first time appear on the file?
Bo

在 2020年3月13日星期五 UTC+8上午1:13:21,Dan Willemsen写道:
I'm not entirely sure what you're asking, but I wouldn't expect most people to be using COMMON_LUNCH_CHOICES very often. That is only used for the lunch menu, which only shows up when you don't pass an argument to lunch, or pass a number (don't do that!). The expected flow would be to do something like:

 $ source build/envsetup.sh
 $ lunch aosp_crosshatch-eng
 $ m

None of those steps will use COMMON_LUNCH_CHOICES.

- Dan

On Thu, Mar 12, 2020 at 8:58 AM Bo YU <tsu...@gmail.com> wrote:
Hi,
    please correct me if i understood wrong.
    In AOSP/build call chains,we know, `source aosp-src/build/envsetup.sh`, it will execute three shell functions firstly:

validate_current_shell
source_vendorsetup
addcompletions 
In my view, it does not affect the config list.especially source_vendorsetup:
But, if it does not source global var,eg,COMMON_LUNCH_CHOICES,
lunch->print_lunch_menu->get_build_var (COMMON_LUNCH_CHOICES)->soong/soong_ui.bash.
Although COMMON_LUNCH_CHOICES is defined in make/target/product/AndroidProducts.mk,
Can we call it directly without preparing read COMMON_LUNCH_CHOICES?
Thank you very much



--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to

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-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages