Ticket #56373: clang_opt_fix.diff

File clang_opt_fix.diff, 733 bytes (added by jwhowarth, 7 years ago)

clang_opt_fix.diff to restore -O3 optimization on darwin

  • setup.py

     
    392392    libs += ["GLEW"]
    393393    libs += pyogl_libs
    394394
    395     ext_comp_args += ["-ffast-math", "-funroll-loops", "-fcommon"]
     395    ext_comp_args += ["-ffast-math", "-funroll-loops", "-fcommon", "-O3"]
    396396
    397397    # optimization currently causes a clang segfault on OS X 10.9 when
    398398    # compiling layer2/RepCylBond.cpp
    399     if sys.platform != 'darwin':
    400         ext_comp_args += ["-O3"]
     399    if sys.platform == 'darwin':
     400        ext_comp_args += ["-fno-strict-aliasing"]
    401401
    402402def get_pymol_version():
    403403    return re.findall(r'_PyMOL_VERSION "(.*)"', open('layer0/Version.h').read())[0]