summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2016-05-07 10:41:41 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-07 10:41:41 -0700
commitb80ff5c73351d0e6762d8122914bb6c10bcd8d9f (patch)
tree7ae4722ca2fb97461d287fa104d6795503cc14d2 /src
parent40068a9f3c614ba15131a8a90d8586816799f11a (diff)
downloadbinaryen-b80ff5c73351d0e6762d8122914bb6c10bcd8d9f.tar.gz
binaryen-b80ff5c73351d0e6762d8122914bb6c10bcd8d9f.tar.bz2
binaryen-b80ff5c73351d0e6762d8122914bb6c10bcd8d9f.zip
Use more static libraries in the CMake build (#451)
* Factor passes and emscripten-optimizer into static libs This removes the redundancies from the source sets in the main CMakeLists.txt. * Make passes an object lib * Use static libs with --whole-archive because Travis has old cmake
Diffstat (limited to 'src')
-rw-r--r--src/emscripten-optimizer/CMakeLists.txt6
-rw-r--r--src/passes/CMakeLists.txt17
-rw-r--r--src/passes/pass.cpp (renamed from src/pass.cpp)0
-rw-r--r--src/support/CMakeLists.txt10
4 files changed, 33 insertions, 0 deletions
diff --git a/src/emscripten-optimizer/CMakeLists.txt b/src/emscripten-optimizer/CMakeLists.txt
new file mode 100644
index 000000000..6c302b991
--- /dev/null
+++ b/src/emscripten-optimizer/CMakeLists.txt
@@ -0,0 +1,6 @@
+SET(emscripten-optimizer_SOURCES
+ optimizer-shared.cpp
+ parser.cpp
+ simple_ast.cpp
+)
+ADD_LIBRARY(emscripten-optimizer STATIC ${emscripten-optimizer_SOURCES})
diff --git a/src/passes/CMakeLists.txt b/src/passes/CMakeLists.txt
new file mode 100644
index 000000000..460910978
--- /dev/null
+++ b/src/passes/CMakeLists.txt
@@ -0,0 +1,17 @@
+SET(passes_SOURCES
+ pass.cpp
+ LowerIfElse.cpp
+ MergeBlocks.cpp
+ Metrics.cpp
+ NameManager.cpp
+ OptimizeInstructions.cpp
+ PostEmscripten.cpp
+ Print.cpp
+ RemoveImports.cpp
+ RemoveUnusedBrs.cpp
+ RemoveUnusedNames.cpp
+ ReorderLocals.cpp
+ SimplifyLocals.cpp
+ Vacuum.cpp
+)
+ADD_LIBRARY(passes STATIC ${passes_SOURCES})
diff --git a/src/pass.cpp b/src/passes/pass.cpp
index e4cc35554..e4cc35554 100644
--- a/src/pass.cpp
+++ b/src/passes/pass.cpp
diff --git a/src/support/CMakeLists.txt b/src/support/CMakeLists.txt
new file mode 100644
index 000000000..08546e3ee
--- /dev/null
+++ b/src/support/CMakeLists.txt
@@ -0,0 +1,10 @@
+SET(support_SOURCES
+ archive.cpp
+ bits.cpp
+ colors.cpp
+ command-line.cpp
+ file.cpp
+ safe_integer.cpp
+ threads.cpp
+)
+ADD_LIBRARY(support STATIC ${support_SOURCES})