aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--libsolc/CMakeLists.txt9
-rw-r--r--libsolc/libsolc.cpp (renamed from solc/jsonCompiler.cpp)2
-rw-r--r--libsolc/libsolc.h (renamed from solc/jsonCompiler.h)0
-rwxr-xr-xscripts/bytecodecompare/storebytecode.sh2
-rwxr-xr-xscripts/test_emscripten.sh2
-rwxr-xr-xscripts/travis-emscripten/build_emscripten.sh4
-rw-r--r--solc/CMakeLists.txt8
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/fuzzer.cpp2
-rw-r--r--test/libsolidity/JSONCompiler.cpp2
11 files changed, 20 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 105de851..8993f372 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,9 +43,10 @@ configure_project(TESTS)
add_subdirectory(libdevcore)
add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
-add_subdirectory(solc)
+add_subdirectory(libsolc)
if (NOT EMSCRIPTEN)
+ add_subdirectory(solc)
add_subdirectory(liblll)
add_subdirectory(lllc)
endif()
diff --git a/libsolc/CMakeLists.txt b/libsolc/CMakeLists.txt
new file mode 100644
index 00000000..e67583dd
--- /dev/null
+++ b/libsolc/CMakeLists.txt
@@ -0,0 +1,9 @@
+if (EMSCRIPTEN)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_compileJSON\",\"_license\",\"_version\",\"_compileJSONMulti\",\"_compileJSONCallback\",\"_compileStandard\"]' -s RESERVED_FUNCTION_POINTERS=20")
+ add_executable(soljson libsolc.cpp)
+ target_link_libraries(soljson PRIVATE solidity)
+else()
+ add_library(libsolc libsolc.cpp)
+ set_target_properties(libsolc PROPERTIES OUTPUT_NAME solc)
+ target_link_libraries(libsolc PRIVATE solidity)
+endif()
diff --git a/solc/jsonCompiler.cpp b/libsolc/libsolc.cpp
index 23feaa2a..3a6e1521 100644
--- a/solc/jsonCompiler.cpp
+++ b/libsolc/libsolc.cpp
@@ -20,7 +20,7 @@
* JSON interface for the solidity compiler to be used from Javascript.
*/
-#include <solc/jsonCompiler.h>
+#include <libsolc/libsolc.h>
#include <libdevcore/Common.h>
#include <libdevcore/JSON.h>
#include <libsolidity/interface/StandardCompiler.h>
diff --git a/solc/jsonCompiler.h b/libsolc/libsolc.h
index c392ce93..c392ce93 100644
--- a/solc/jsonCompiler.h
+++ b/libsolc/libsolc.h
diff --git a/scripts/bytecodecompare/storebytecode.sh b/scripts/bytecodecompare/storebytecode.sh
index 8d4100bf..557e3275 100755
--- a/scripts/bytecodecompare/storebytecode.sh
+++ b/scripts/bytecodecompare/storebytecode.sh
@@ -40,7 +40,7 @@ TMPDIR=$(mktemp -d)
if [[ "$SOLC_EMSCRIPTEN" = "On" ]]
then
- cp "$REPO_ROOT/build/solc/soljson.js" .
+ cp "$REPO_ROOT/build/libsolc/soljson.js" .
npm install solc
cat > solc <<EOF
#!/usr/bin/env node
diff --git a/scripts/test_emscripten.sh b/scripts/test_emscripten.sh
index 4996e957..b659e5e5 100755
--- a/scripts/test_emscripten.sh
+++ b/scripts/test_emscripten.sh
@@ -29,7 +29,7 @@
set -e
REPO_ROOT=$(cd $(dirname "$0")/.. && pwd)
-SOLJSON="$REPO_ROOT/build/solc/soljson.js"
+SOLJSON="$REPO_ROOT/build/libsolc/soljson.js"
DIR=$(mktemp -d)
(
diff --git a/scripts/travis-emscripten/build_emscripten.sh b/scripts/travis-emscripten/build_emscripten.sh
index bf460e8e..56826997 100755
--- a/scripts/travis-emscripten/build_emscripten.sh
+++ b/scripts/travis-emscripten/build_emscripten.sh
@@ -87,8 +87,8 @@ make -j 4
cd ..
mkdir -p upload
-cp build/solc/soljson.js upload/
-cp build/solc/soljson.js ./
+cp build/libsolc/soljson.js upload/
+cp build/libsolc/soljson.js ./
OUTPUT_SIZE=`ls -la soljson.js`
diff --git a/solc/CMakeLists.txt b/solc/CMakeLists.txt
index 656b27c3..d9b12a06 100644
--- a/solc/CMakeLists.txt
+++ b/solc/CMakeLists.txt
@@ -10,14 +10,6 @@ target_link_libraries(solc PRIVATE solidity ${Boost_PROGRAM_OPTIONS_LIBRARIES})
include(GNUInstallDirs)
install(TARGETS solc DESTINATION "${CMAKE_INSTALL_BINDIR}")
-if (EMSCRIPTEN)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_compileJSON\",\"_license\",\"_version\",\"_compileJSONMulti\",\"_compileJSONCallback\",\"_compileStandard\"]' -s RESERVED_FUNCTION_POINTERS=20")
- add_executable(soljson jsonCompiler.cpp)
-else()
- add_library(soljson jsonCompiler.cpp)
-endif()
-target_link_libraries(soljson PRIVATE solidity)
-
if(SOLC_LINK_STATIC AND UNIX AND NOT APPLE)
# Produce solc as statically linked binary (includes C/C++ standard libraries)
# This is not supported on macOS, see
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 6a8a4399..f36ad4c5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -3,7 +3,7 @@ list(REMOVE_ITEM sources "${CMAKE_CURRENT_SOURCE_DIR}/fuzzer.cpp")
file(GLOB_RECURSE headers "*.h")
add_executable(soltest ${sources} ${headers})
-target_link_libraries(soltest PRIVATE soljson solidity lll evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
+target_link_libraries(soltest PRIVATE libsolc solidity lll evmasm devcore ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
add_executable(solfuzzer fuzzer.cpp)
-target_link_libraries(solfuzzer soljson evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES})
+target_link_libraries(solfuzzer PRIVATE libsolc evmasm ${Boost_PROGRAM_OPTIONS_LIBRARIES})
diff --git a/test/fuzzer.cpp b/test/fuzzer.cpp
index 53ba7201..578e63a4 100644
--- a/test/fuzzer.cpp
+++ b/test/fuzzer.cpp
@@ -20,7 +20,7 @@
#include <libevmasm/Assembly.h>
#include <libevmasm/ConstantOptimiser.h>
-#include <solc/jsonCompiler.h>
+#include <libsolc/libsolc.h>
#include <json/json.h>
diff --git a/test/libsolidity/JSONCompiler.cpp b/test/libsolidity/JSONCompiler.cpp
index 7dc4808b..0c904c77 100644
--- a/test/libsolidity/JSONCompiler.cpp
+++ b/test/libsolidity/JSONCompiler.cpp
@@ -23,7 +23,7 @@
#include <boost/test/unit_test.hpp>
#include <libdevcore/JSON.h>
#include <libsolidity/interface/Version.h>
-#include <solc/jsonCompiler.h>
+#include <libsolc/libsolc.h>
#include "../Metadata.h"
#include "../TestHelper.h"