Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cmake build issues and gcc hang #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Mar 18, 2015

  1. fix glsl_test compile error with cmake

    added #include <cstdlib> to glsl_optimizer_tests.cpp to fix:
    
     tests/glsl_optimizer_tests.cpp:324:180: error: ‘system’ was not declared in this scope
      int res = system("/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/bin/metal metalTemp.metal -o metalTemp.o -std=ios-metal1.0 -Wno-parentheses-equality");
    
    This was happening with cmake on both Linux (gcc) and OSX (clang),
    so perhaps it is something that is taken care of by Xcode.
    neomantra committed Mar 18, 2015
    Configuration menu
    Copy the full SHA
    0dc00bf View commit details
    Browse the repository at this point in the history
  2. fix multiple definition of _mesa_error_no_memory link error

    removed the empty definition in standalone_scaffolding.h (but kept the declaration)
    and added specific definitions to the executables that need it (glslopt and glsl_test)
    
    This multiple definition was occurring in Linux and OSX with cmake.  The changes
    build properly on Linux-cmake, OSX-cmake, and OSX-xcode. The tests pass on both
    OSX-builds.  The Linux-cmake tests fail, but they fail before this commit.
    I do not have access to MSVC.
    neomantra committed Mar 18, 2015
    Configuration menu
    Copy the full SHA
    e480701 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2015

  1. 44: fix optimizer hangs on gcc builds

    For some reason gcc (versions 4.6 and 4.8) optimizes out the
    "Trim out variables" loop in `ir_array_reference_visitor::get_split_list`,
    even we don't want it too.
    
    If that loop disappears, then the variables are never considered split
    and not removed from the list, so the optimization continues
    indefinitely.
    
    Placing a memory fence in the loop prevents it from being optimized
    out; this is done just with gcc.
    neomantra committed Mar 19, 2015
    Configuration menu
    Copy the full SHA
    9bffe9d View commit details
    Browse the repository at this point in the history