Git Product home page Git Product logo

Comments (6)

pcc avatar pcc commented on May 7, 2024

It should just be necessary to use -DCMAKE_BUILD_TYPE=Debug, which should cause the build system to automatically pick up the correct version of LLVM in the third_party directory. If you do not specify CMAKE_BUILD_TYPE, the build system will not find LLVM automatically. It would probably be a good idea to print an error message or something in this case. Or are you saying that even if you specify CMAKE_BUILD_TYPE the build still does not find LLVM?

We do mention that Debug is the default (see step 1 under "Building Souper"), although I agree that it should be clearer what the consequences are.

from souper.

msoos avatar msoos commented on May 7, 2024

It does not seem to find LLVM, and I did give it the Debug type. I do not have LLVM installed, it's simply in souper_dir/third_party/llvm. I build from souper_dir/build, though, which is probably "non-normal".

I am a bit surprised that Debug is the default. It makes most people think Souper is slow, but it's only clang that's slow (at least clang is contributing for sure).

from souper.

regehr avatar regehr commented on May 7, 2024

It's true that Release might be a more reasonable default since we try to keep the code quality high in the master branch. Debug is so slow that I only use it when dealing with the most painful problems.

from souper.

msoos avatar msoos commented on May 7, 2024

I think RelWithDebInfo is a much better solution. Asserts will still be inside along with debug symbols, but you get to build with -O2 (in most cases, if overridden, -O3). Debug is indeed painfully slow and for development I have found RelWithDebInfo to be a good default.

from souper.

pcc avatar pcc commented on May 7, 2024

RelWithDebInfo does not enable assertions. The LLVM project needed to introduce its own hackery to make it easy to enable assertions in a release build:

http://llvm.org/klaus/llvm/blob/29f94c72014eaa5d0d3b920686e689e79759cacb/cmake/modules/HandleLLVMOptions.cmake#L-49

I don't know if we want something similar.

I'd prefer not to enable a particular set of things-useful-for-debugging by default since it is mostly a matter of personal preference. Maybe one thing we can agree on is that Release is a good setting for people who just want to use souper, so maybe that should be the default.

from souper.

regehr avatar regehr commented on May 7, 2024

I'm not too interested in that kind of code right now. I'll switch my pull req to Release, which is usually OK even while hacking on Souper.

from souper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.