[llvm] r229761 - [Orc][Kaleidoscope] Make the Orc/Kaleidoscope tutorials easier to build on
Lang Hames
lhames at gmail.com
Wed Feb 18 15:08:56 PST 2015
Author: lhames
Date: Wed Feb 18 17:08:56 2015
New Revision: 229761
URL: http://llvm.org/viewvc/llvm-project?rev=229761&view=rev
Log:
[Orc][Kaleidoscope] Make the Orc/Kaleidoscope tutorials easier to build on
Darwin.
Modified:
llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/Makefile
llvm/trunk/examples/Kaleidoscope/Orc/initial/Makefile
llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/Makefile
llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/Makefile
Modified: llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/Makefile?rev=229761&r1=229760&r2=229761&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/Makefile (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/fully_lazy/Makefile Wed Feb 18 17:08:56 2015
@@ -1,8 +1,15 @@
-.PHONY: all
-all: toy
+UNAME := $(shell uname -s)
+
+ifeq ($(UNAME),Darwin)
+ CXX := xcrun --sdk macosx clang++
+else
+ CXX := clang++
+endif
+
+LLVM_CXXFLAGS := $(shell llvm-config --cppflags --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
- clang++ -Wall -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy
+ $(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++14 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp
.PHONY: clean
clean:
Modified: llvm/trunk/examples/Kaleidoscope/Orc/initial/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/initial/Makefile?rev=229761&r1=229760&r2=229761&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/initial/Makefile (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/initial/Makefile Wed Feb 18 17:08:56 2015
@@ -1,8 +1,15 @@
-.PHONY: all
-all: toy
+UNAME := $(shell uname -s)
+
+ifeq ($(UNAME),Darwin)
+ CXX := xcrun --sdk macosx clang++
+else
+ CXX := clang++
+endif
+
+LLVM_CXXFLAGS := $(shell llvm-config --cppflags --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
- clang++ -Wall -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy
+ $(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++14 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp
.PHONY: clean
clean:
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/Makefile?rev=229761&r1=229760&r2=229761&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/Makefile (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_codegen/Makefile Wed Feb 18 17:08:56 2015
@@ -1,8 +1,15 @@
-.PHONY: all
-all: toy
+UNAME := $(shell uname -s)
+
+ifeq ($(UNAME),Darwin)
+ CXX := xcrun --sdk macosx clang++
+else
+ CXX := clang++
+endif
+
+LLVM_CXXFLAGS := $(shell llvm-config --cppflags --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
- clang++ -Wall -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy
+ $(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++14 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp
.PHONY: clean
clean:
Modified: llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/Makefile?rev=229761&r1=229760&r2=229761&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/Makefile (original)
+++ llvm/trunk/examples/Kaleidoscope/Orc/lazy_irgen/Makefile Wed Feb 18 17:08:56 2015
@@ -1,8 +1,15 @@
-.PHONY: all
-all: toy
+UNAME := $(shell uname -s)
+
+ifeq ($(UNAME),Darwin)
+ CXX := xcrun --sdk macosx clang++
+else
+ CXX := clang++
+endif
+
+LLVM_CXXFLAGS := $(shell llvm-config --cppflags --ldflags --system-libs --libs core orcjit native)
toy: toy.cpp
- clang++ -Wall -std=c++11 toy.cpp -g -O0 -rdynamic -fno-rtti `llvm-config --cppflags --ldflags --system-libs --libs core orcjit native` -o toy
+ $(CXX) $(LLVM_CXXFLAGS) -Wall -std=c++14 -g -O0 -rdynamic -fno-rtti -o toy toy.cpp
.PHONY: clean
clean:
More information about the llvm-commits
mailing list