Hello everyone,
When I execute the cmd “make” the build is successful. However, the executable is NOT created/generated. Am I doing something wrong?
Below is my makefile in my example directory which is located in:
static_analysis/build/release/tools/clang/tools/example
which contains the Example.cpp file I want to compile
Makefile:
CLANG_LEVEL:= …/…
TOOLNAME = example #the name of tool’s executable
SOURCES := Example.cpp #the Clang source files you want to compile
include $(CLANG_LEVEL)/…/…/Makefile.config
LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser bitreader support mc option
USEDLIBS = clangFrontend.a clangSerialization.a clangDriver.a \
clangTooling.a clangParse.a clangSema.a
clangAnalysis.a clangRewriteFrontend.a clangRewriteCore.a
clangEdit.a clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
Any help would be greatly appreciated!
Hi Omid,
When I execute the cmd "make" the build is successful. However, the
executable is NOT created/generated. Am I doing something wrong?
Below is my makefile in my example directory which is located in:
static_analysis/build/release/tools/clang/tools/example
I'm glad to hear I'm not alone 
I have a very similar setup for IWYU that I rarely use, and I couldn't
get it to work yesterday.
My guess is that the Autotools/Make system is no longer working, and
that CMake is the way to go. The docs for the build system warns that
it's deprecated and will be removed:
http://llvm.org/docs/BuildingLLVMWithAutotools.html
That said, I can heartily recommend plugging into the CMake system, it
gives you a lot of portability for free. Look at the CMakeLists.txt
for the Clang tools to get started.
- Kim
Hi Omid,
When I execute the cmd "make" the build is successful. However, the
executable is NOT created/generated. Am I doing something wrong?
Below is my makefile in my example directory which is located in:
static_analysis/build/release/tools/clang/tools/example
Did you try adding your new directory to clang/tools/Makefile?
I'm glad to hear I'm not alone 
I have a very similar setup for IWYU that I rarely use, and I couldn't
get it to work yesterday.
My guess is that the Autotools/Make system is no longer working, and
It does still work.
that CMake is the way to go. The docs for the build system warns that
Yes, CMake is the way to go for new projects.
it's deprecated and will be removed:
http://llvm.org/docs/BuildingLLVMWithAutotools.html
Yup.