Ignore:
Timestamp:
May 14, 2008, 9:11:07 AM (9 years ago)
Author:
jmr@…
Message:

Reworked the handling of the default universal variant. We can now avoid
adding it at all when we know it won't work. Fix for #12170.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portutil.tcl

    r36722 r36764  
    16531653}
    16541654
     1655proc default_universal_variant_allowed {args} {
     1656   
     1657    if {[variant_exists universal]} {
     1658        ui_debug "universal variant already exists, so not adding the default one"
     1659        return no
     1660    } elseif {[exists universal_variant] && ![option universal_variant]} {
     1661        ui_debug "'universal_variant no' specified, so not adding the default universal variant"
     1662        return no
     1663    } elseif {[exists use_xmkmf] && [option use_xmkmf]} {
     1664        ui_debug "using xmkmf, so not adding the default universal variant"
     1665        return no
     1666    } elseif {[exists use_configure] && ![option use_configure]} {
     1667        ui_debug "not using configure, so not adding the default universal variant"
     1668        return no
     1669    } elseif {![exists os.universal_supported] || ![option os.universal_supported]} {
     1670        ui_debug "OS doesn't support universal builds, so not adding the default universal variant"
     1671        return no
     1672    } else {
     1673        ui_debug "adding the default universal variant"
     1674        return yes
     1675    }
     1676}
     1677
     1678proc add_default_universal_variant {args} {
     1679    # Declare default universal variant, on >10.3
     1680    variant universal description {Build for multiple architectures} {
     1681        if {![file exists ${configure.universal_sysroot}]} {
     1682            return -code error "Universal SDK is not installed (are we running on 10.3? did you forget to install it?) and building with +universal will very likely fail"
     1683        }
     1684        eval configure.args-append ${configure.universal_args}
     1685        eval configure.cflags-append ${configure.universal_cflags}
     1686        eval configure.cppflags-append ${configure.universal_cppflags}
     1687        eval configure.cxxflags-append ${configure.universal_cxxflags}
     1688        eval configure.ldflags-append ${configure.universal_ldflags}
     1689    }
     1690}
     1691
    16551692# Target class definition.
    16561693
Note: See TracChangeset for help on using the changeset viewer.