Thanks Dan for the response. Yes we are using a custom json file to 
maintain compiler flags and this json file is parsed in 
build/soong/cc/config/global.go file.

I tried adding a Android.bp file to create a module with json file as src 
file and added this module as dependency in Android.bp file in folder 
containing global.go file.

This did not work , I got “depends on undefined module test-json” error 
message in the build.

Is there anyway to add json file as dependency to the go modules?


Also I think that go files are executed only in the clean build not in 
incremental build. Is it possible to retrigger go files execution in 
Incremental build to regenerate the build config(  not sure if re running 
the go files will affect the source file changes timestamps and hashes 
needed for Incremental build to work).

 

Thanks,

Vijay


On Thursday, August 3, 2023 at 8:12:12 PM UTC+5:30 Dan Willemsen wrote:

> Any changes in .mk / .bp files should be producing correct incremental 
> builds -- in general since the ninja migration in Android N, though there 
> have been some bug fixes over the years since for some specific use cases. 
> Bug reports would be useful for any cases that you can reproduce on AOSP.
>
> change C/C++ compiler flags in the build configuration files like .json
>>
>
> I'm unaware of any places where we load compiler flags from json files. If 
> you've made your own changes to the build system or compiler, that may need 
> more changes in the build system to produce correct incremental builds 
> (marking any additional files read as dependencies to wherever they're 
> read).
>
> One of the special cases is that we don't actually depend on the clang 
> compiler itself for incremental builds, so if you update it in place, that 
> may not trigger rebuilds. Our compiler updates are in version-specific 
> paths, and the path change will trigger a command line change, and thus 
> proper incremental builds.
>
> - Dan
>
> On Thu, Aug 3, 2023 at 9:06 AM Vijay Ede <quic...@quicinc.com> wrote:
>
>> Hi,
>> I want to check if we have an option to do incremental build after we 
>> change C/C++ compiler flags in the build configuration files like .json, 
>> .mk or .bp.
>>
>> Currently i am seeing if we update the compiler flags in the config file 
>> and do incremental build it is not taking the upadated flags. we have to 
>> delete the out/ folder and run full build again for updated flags to affect 
>> and this takes longer build times.
>>
>> The context i am looking for this is when we do toolchain version 
>> migration we might have some compiler related errors which might need 
>> update in compiler flags. So instead of doing clean build, i am looking for 
>> a way that rest of the build from the point of error continues with new 
>> flags. 
>>
>> Thanks
>> Vijay
>>
>> -- 
>> -- 
>> 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/4f428018-1cd4-4e6f-9897-d29cfe821479n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/android-building/4f428018-1cd4-4e6f-9897-d29cfe821479n%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 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/2ff3466d-8b71-4323-87d3-733fd29d5959n%40googlegroups.com.

Reply via email to