Forums - FAQ: Conditional compilation of library using Uses flags

2 posts / 0 new
Last post
FAQ: Conditional compilation of library using Uses flags
brianp
Join Date: 5 Dec 12
Posts: 41
Posted: Thu, 2013-10-10 18:39
Conditional compilation of library can be done using following steps:
1. Define the uses flag as below:
env.AddUsesFlags('USES_XXXX')
2. Use the uses flag to conditionally compile a library as follows:
if ' USES_XXXX ' in env:
                   env.AddLibrary (list of build tags, lib name, sources)
Example:
if 'USES_BSACDEC' in env:
env.AddLibrary(['HAP_AVS_ADSP'], BsacDecoderLib, sources)
 
Secondly, there is also an option '–f' available with build.py. Can use this option to add the required uses flag.
Eg:
python build.py –f CUSTOM_FLAG
 
The build compilation has to be under this flag as follows in the respective scons file:
if ' CUSTOM_FLAG' in env:
env.AddLibrary (list of build tags, lib name, sources)

 

  • Up0
  • Down0
ehsaas8171bisp
Join Date: 4 Feb 24
Posts: 5
Posted: Sun, 2024-02-04 11:07

It appears that you've highlighted a topic related to forums and frequently asked questions (FAQs) about the conditional compilation of a library using "Uses" flags. If you have specific questions or if there's more information you'd like to discuss regarding this topic, please provide additional details, and I'll do my best to assist you. https://ehsaas8171bisp.com/

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.