No, that is not possible.  Even without soong it's not possible to do
reliably - Android.mk files for a directory are sometimes parsed without
the rest of the tree, so one module may or may not see flags that were set
in another module.

On Thu, Dec 21, 2017 at 8:29 PM, Priyanka Bose <dolabose...@gmail.com>
wrote:

> Hi Colin,
>
> Thanks for the reply !
> Ok but then it might not be possible to update this flag so early in the
> build.
> The flag can only be set in my development code and that is enabled in its
> Android.mk file.
>
> So do you have any other suggestions then as to how can I add srcs and
> libs  as a part of conditional flag in  my Android.bp
> based on whether that flag is enabled/disabled in it's Android.mk file.
>
> Thanks in advance !
>
> Best Regards
> Priyanka
>
> On Friday, December 22, 2017 at 2:13:50 AM UTC+5:30, Colin Cross wrote:
>>
>> soong_config.mk is parsed very early, before any of the Android.mk files
>> and many of the files in build/make/core.  You probably need to set your
>> variable in your product's BoardConfig.mk file.
>>
>> On Thu, Dec 21, 2017 at 12:07 PM, Priyanka Bose <dolab...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I need to add a conditional flag based on which I need to include my
>>> srcs and libs when they are enabled.
>>> As  some suggestions in the other posts, I have added a  struct variable
>>> under productvariable in the variables.go.
>>> Then included the same in the soong_config.mk file.
>>> Made the changes in my .bp file to include that productvariable struct.
>>> In my .go file , I have checked for the condition variable ( which I am
>>> enabling in one of the .mk files) and based on that updating the flag.
>>>
>>> The problem is regardless of whether I enable or disable the flag in my
>>> .mk file, all files get compiled .
>>> The compilation is success but when I checked the
>>> /out/soong/soong.variables file generated after my build, I see that the
>>> new product variable is present
>>>  in the variable.go but that is null , hence not updated.
>>>
>>> Can you tell me how to  ensure that my specific soong variable is
>>> updated based on the flags I set in the mk files.
>>> And also accordingly the set of srcs are compiled
>>>
>>> Best Regards
>>> Priyanka
>>>
>>> --
>>> --
>>> 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.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to