Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove libponyc's link dependency on blake2 library. #3715

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion benchmark/libponyc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ target_link_directories(libponyc.benchmarks
target_link_libraries(libponyc.benchmarks
PRIVATE libponyc
PRIVATE libponyrt
PRIVATE blake2
PRIVATE benchmark::benchmark
)

Expand Down
9 changes: 0 additions & 9 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,6 @@ ExternalProject_Add(googletest
CMAKE_ARGS -DCMAKE_BUILD_TYPE=${PONYC_LIBS_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_CXX_FLAGS=-fpic -Dgtest_force_shared_crt=ON --no-warn-unused-cli
)

add_library(blake2 STATIC blake2/blake2b-ref.c)
set_property(TARGET blake2 PROPERTY POSITION_INDEPENDENT_CODE ON)

install(TARGETS blake2
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
COMPONENT library
)

find_package(Git)

set(LLVM_DESIRED_HASH "c1a0a213378a458fbea1a5c77b315c7dce08fd05")
Expand Down
2 changes: 1 addition & 1 deletion src/libponyc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_library(libponyc STATIC
ast/symtab.c
ast/token.c
ast/treecheck.c
blake2/blake2b-ref.c
codegen/codegen.c
codegen/genbox.c
codegen/gencall.c
Expand Down Expand Up @@ -105,7 +106,6 @@ target_compile_definitions(libponyc PRIVATE
target_include_directories(libponyc
PUBLIC ../common
PRIVATE ../../build/libs/include
PRIVATE ../../lib/blake2
)

if (MSVC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ static BLAKE2_INLINE uint16_t load16( const void *src )
return w;
#else
const uint8_t *p = ( const uint8_t * )src;
return (( uint16_t )( p[0] ) << 0) |
(( uint16_t )( p[1] ) << 8) ;
return ( uint16_t )(( uint16_t )( p[0] ) << 0) |
( uint16_t )(( uint16_t )( p[1] ) << 8) ;
#endif
}

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/libponyc/pkg/package.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "../../libponyrt/mem/pool.h"
#include "../../libponyrt/sched/scheduler.h"
#include "ponyassert.h"
#include <blake2.h>
#include "../blake2/blake2.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
Expand Down
2 changes: 1 addition & 1 deletion src/libponyc/pkg/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "../../libponyrt/gc/serialise.h"
#include "../../libponyrt/mem/pool.h"
#include "ponyassert.h"
#include <blake2.h>
#include "../blake2/blake2.h"
#include <string.h>


Expand Down
2 changes: 0 additions & 2 deletions src/ponyc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ if (MSVC)
target_link_libraries(ponyc
PRIVATE libponyc
PRIVATE libponyrt
PRIVATE blake2
PRIVATE dbghelp
PRIVATE ucrt
PRIVATE Ws2_32
Expand All @@ -36,7 +35,6 @@ else()
target_link_libraries(ponyc PRIVATE
libponyc
libponyrt
blake2
)

llvm_config(ponyc all)
Expand Down
3 changes: 0 additions & 3 deletions test/libponyc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ if (MSVC)
target_link_libraries(libponyc.tests
PRIVATE libponyc
PRIVATE libponyrt
PRIVATE blake2
PRIVATE GTest::gtest
PRIVATE dbghelp
PRIVATE ucrt
Expand All @@ -104,7 +103,6 @@ else()
target_link_libraries(libponyc.tests PRIVATE
-Wl,-force_load,../../src/libponyrt/libponyrt.a
libponyc
blake2
GTest::gtest
)
else()
Expand All @@ -113,7 +111,6 @@ else()
libponyrt
-Wl,--no-whole-archive
libponyc
blake2
GTest::gtest
)
endif()
Expand Down