Conversation
7c1317d to
cac25a2
Compare
|
I think this might break the emscripten deploy step (also solc-js has to be adapted). |
|
I'd just keep the name as |
|
@chfast the executable |
|
If you use the same target names you will have the problem.
|
|
I am actually using |
libsolc/CMakeLists.txt
Outdated
| @@ -0,0 +1,11 @@ | |||
| set( | |||
There was a problem hiding this comment.
I was wondering about this. The same applies to solc/CMakeLists.txt too I guess.
There was a problem hiding this comment.
The set() just sets the variable value. It is sources = "". If sources are not used anywhere remove it.
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s EXPORTED_FUNCTIONS='[\"_compileJSON\",\"_license\",\"_version\",\"_compileJSONMulti\",\"_compileJSONCallback\",\"_compileStandard\"]' -s RESERVED_FUNCTION_POINTERS=20") | ||
| add_executable(libsolc libsolc.cpp) | ||
| else() | ||
| add_library(libsolc libsolc.cpp) |
There was a problem hiding this comment.
Without changing the OUTPUT_NAME you will get a file of name liblibsolc.a.
| if [[ "$SOLC_EMSCRIPTEN" = "On" ]] | ||
| then | ||
| cp "$REPO_ROOT/build/solc/soljson.js" . | ||
| cp "$REPO_ROOT/build/libsolc/libsolc.js" . |
There was a problem hiding this comment.
. needs to be replaced with soljson.js
libsolc/CMakeLists.txt
Outdated
| @@ -0,0 +1,11 @@ | |||
| set( | |||
There was a problem hiding this comment.
You forgot to include this script in main CMakeLists.txt script. CMake does not know what libsolc is and it assumed its some system library.
|
The properties thing doesn't work here: |
|
This is a separated command: |
|
My bad. It seems to work perfectly now, thanks! |
93e36a4 to
19b8e4f
Compare
libsolc/CMakeLists.txt
Outdated
| add_executable(soljson libsolc.cpp) | ||
| target_link_libraries(soljson PRIVATE solidity) | ||
| else() | ||
| add_library(libsolc SHARED libsolc.cpp) |
There was a problem hiding this comment.
The SHARED part could be skipped for this PR.
There was a problem hiding this comment.
Why do you need it to be a shared library?
|
@chriseth happy to merge? |
|
needs rebase |
Part of #2864.