VirtualBox

Changeset 2955 in kBuild for trunk/src/lib/kDep.c


Ignore:
Timestamp:
Sep 21, 2016 7:05:53 PM (9 years ago)
Author:
bird
Message:

kDepObj: Added -e<ignored .ext> option for avoid circular dependencies when compiling the precompiled header file (pch).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/kDep.c

    r2950 r2955  
    187187 * 'Optimizes' and corrects the dependencies.
    188188 */
    189 void depOptimize(int fFixCase, int fQuiet)
     189void depOptimize(int fFixCase, int fQuiet, const char *pszIgnoredExt)
    190190{
    191191    /*
    192192     * Walk the list correct the names and re-insert them.
    193193     */
    194     PDEP pDepOrg = g_pDeps;
    195     PDEP pDep = g_pDeps;
     194    size_t  cchIgnoredExt = pszIgnoredExt ? strlen(pszIgnoredExt) : 0;
     195    PDEP    pDepOrg = g_pDeps;
     196    PDEP    pDep = g_pDeps;
    196197    g_pDeps = NULL;
    197198    for (; pDep; pDep = pDep->pNext)
     
    214215            continue;
    215216        pszFilename = pDep->szFilename;
     217
     218        /*
     219         * Skip pszIgnoredExt if given.
     220         */
     221        if (   pszIgnoredExt
     222            && pDep->cchFilename > cchIgnoredExt
     223            && memcmp(&pDep->szFilename[pDep->cchFilename - cchIgnoredExt], pszIgnoredExt, cchIgnoredExt) == 0)
     224            continue;
    216225
    217226#if K_OS != K_OS_OS2 && K_OS != K_OS_WINDOWS
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette