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

No friction when compiling with Clang on Mac OSX. #164

Closed
erwincoumans opened this issue Apr 27, 2014 · 2 comments
Closed

No friction when compiling with Clang on Mac OSX. #164

erwincoumans opened this issue Apr 27, 2014 · 2 comments

Comments

@erwincoumans
Copy link
Member

Create project files using cmake on Mac OSX using clang, and friction appears to be broken.

See also discussion here:
http://bulletphysics.org/Bullet/phpBB3/posting.php?mode=reply&f=9&t=9851

@erwincoumans
Copy link
Member Author

Jens wrote:

"Just look like i solved this problem in Blender.
Problem is inlining in btSolverBody.h

#ifdef USE_SIMD

struct  btSimdScalar
{
    SIMD_FORCE_INLINE   btSimdScalar()
    {

    }
/* workaround for clang 3.4 ( == apple clang 5.1 ) issue, friction would fail with forced inlining */
#if (defined(__clang__) && defined(__apple_build_version__) &&  (__clang_major__ == 5) && (__clang_minor__ == 1)) \
|| (defined(__clang__) && !defined(__apple_build_version__) && (__clang_major__ == 3) && (__clang_minor__ == 4))
    inline __attribute__ ((noinline)) btSimdScalar(float    fl)
#else
    SIMD_FORCE_INLINE   btSimdScalar(float  fl)
#endif

Perhaps not the root problem ( compiler bug or strictness ? )

Cheers ... Jens"

@erwincoumans
Copy link
Member Author

This commit seems to be a work-around for the Clang
907ac49
If I have time, I will create a repro case for Clang/LLVM developers (unless they already fixed it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant