~pythonregexp2.7/python/issue2636-12

« back to all changes in this revision

Viewing changes to Lib/distutils/unixccompiler.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-06-09 14:52:42 UTC
  • mfrom: (39033.1.3 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080609145242-9m268zc6u87rp1vp
Merged in changes from the core Regexp branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        stripArch = '-arch' in cc_args
65
65
        stripSysroot = '-isysroot' in cc_args
66
66
 
67
 
    if stripArch:
 
67
    if stripArch or 'ARCHFLAGS' in os.environ:
68
68
        while 1:
69
69
            try:
70
70
                index = compiler_so.index('-arch')
73
73
            except ValueError:
74
74
                break
75
75
 
 
76
    if 'ARCHFLAGS' in os.environ and not stripArch:
 
77
        # User specified different -arch flags in the environ,
 
78
        # see also distutils.sysconfig
 
79
        compiler_so = compiler_so + ' ' + os.environ['ARCHFLAGS']
 
80
 
 
81
 
76
82
    if stripSysroot:
77
83
        try:
78
84
            index = compiler_so.index('-isysroot')