--
--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 presentin 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 compiledBest RegardsPriyanka
--
--
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-buildi...@googlegroups.com.
To post to this group, send email to android-building@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-building+unsubscribe@googlegroups.com.
1. So for including the srcs , I added the Env_struct { Srcs []string } to varaibleProperties in build/soong/variable.go
2. Env_struct *string `json:",omitempty to productVariables in build/soong/variable.go
3. Passed ENV_VARIABLE to Env_struct in build/make/core/soong_config.mk
=> echo ' "Env_struct": "$(ENV_TEST)",'
4. Now within the Dummy Dir, I have set the ENV_TEST as true/false in its Android.mk file.
The problem comes here :
5) In the Dummy.go file , when I check if the flag of ENV_TEST is enabled or not , it always reads null.
I have checked with fmt.Println(" Env value:",$(ENV_TEST));, so it looks like the flag is never updated