Skip to content

Commit

Permalink
Исправлена сборка под Ubuntu 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
orefkov committed Nov 13, 2023
1 parent 6b542a8 commit 4952276
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif ()

option(V8SQLITE_STATIC_RUNTIME "Подключать рантайм-библиотеки статически" ON)
option(V8SQLITE_BUILD_TESTS "Построить тесты" ON)
option(V8SQLITE_BENCHMARKS "Построить замеры производительности" ON)
option(V8SQLITE_BENCHMARKS "Построить замеры производительности" OFF)

# Установим дефолтные значения
if (WIN32)
Expand Down Expand Up @@ -43,7 +43,7 @@ if (WIN32)

elseif (UNIX)
# Флаги для компилятора clang++ во всех конфигурациях
set (V8SQLITE_CXX_CLANG_FLAGS "-fPIC -std=c++20 -fexperimental-library -DLIBCXX_ENABLE_INCOMPLETE_FEATURES=ON -stdlib=libc++" CACHE STRING "")
set (V8SQLITE_CXX_CLANG_FLAGS "-fPIC -std=c++20 -fexperimental-library -DLIBCXX_ENABLE_INCOMPLETE_FEATURES=ON -stdlib=libstdc++" CACHE STRING "")
# Флаги для компилятора clang во всех конфигурациях
set (V8SQLITE_C_CLANG_FLAGS "-fPIC" CACHE STRING "")
# Флаги для компилятора clang в релизной конфигурации
Expand Down
3 changes: 3 additions & 0 deletions include/core_as/core_as_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
*/
#pragma once
#include <cstdlib>
#include <cstdint>
#include <atomic>
#include <memory>

#ifndef __has_declspec_attribute
#define __has_declspec_attribute(x) 0
Expand Down
1 change: 1 addition & 0 deletions include/core_as/str/sstring.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <unordered_map>
#include <tuple>
#include <limits>
#include <string.h>

#ifdef _MSC_VER
// warning C4201 : nonstandard extension used : nameless struct / union
Expand Down
9 changes: 6 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Linux x64

Сама библиотека sqlite подключена статически, то есть внедрена в ВК.
Используется версия 3.39.4. Версию sqlite можно узнать запросом
Используется версия 3.44.0. Версию sqlite можно узнать запросом

```
select sqlite_version()
Expand Down Expand Up @@ -38,8 +38,11 @@

## Сборка
Собирается как cmake проект в Visual Studio Community Edition 2022. Под windows проверял в MSVC и Clang.
Под linux собирается подключением к удалённой машине с установленным Clang, проверял на 14ом, 15ом.
В бинарной сборке: win x86 собрана MSVC, win x64 - clang-cl, Linux x64 - Clang.
Под linux собирается подключением к удалённой машине с установленным Clang, собирал на clang-16.
В бинарной сборке:
- win x86 собрана MSVC
- win x64 - clang-cl 16
- Linux x64 - clang-16, в двух версиях, под Ubuntu 18.04 с GLIBC 2.25, под Ubuntu 22 - с GLIBC 2.34

## Использование

Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ else ()
target_link_options(${PROJECT_NAME} PRIVATE -static-libgcc -static-libstdc++)
endif ()
target_link_options(${PROJECT_NAME} PRIVATE -Wl,--no-undefined -Xlinker --version-script -Xlinker ${CMAKE_CURRENT_SOURCE_DIR}/version.script)
target_link_libraries(${PROJECT_NAME} pthread)
endif()

set_target_properties( ${PROJECT_NAME} PROPERTIES
Expand Down

0 comments on commit 4952276

Please sign in to comment.