From b21d667bdfb13df15f249896155f98f175a89657 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 8 Nov 2020 12:09:27 +0300 Subject: [PATCH 1/4] Fix compilation error. --- td/telegram/MessageContent.h | 1 + 1 file changed, 1 insertion(+) diff --git a/td/telegram/MessageContent.h b/td/telegram/MessageContent.h index 65d19c517..b4a7105a7 100644 --- a/td/telegram/MessageContent.h +++ b/td/telegram/MessageContent.h @@ -32,6 +32,7 @@ #include "td/utils/common.h" #include "td/utils/Status.h" +#include #include namespace td { From f9a600c401ba20af7e07ee60e12b1de28dd2e14c Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 8 Nov 2020 14:00:36 +0300 Subject: [PATCH 2/4] Minor fixes. --- .gitattributes | 1 - td/telegram/MessageContent.h | 1 - td/telegram/MessageContentType.h | 2 ++ tdutils/td/utils/AtomicRead.h | 1 - 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 1aeb2b1a0..2d04f9b7e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,7 +13,6 @@ *.cmake text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent *.md text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent *.in text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent -*.sky text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent *.html text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent *.java text whitespace=blank-at-eol,space-before-tab,blank-at-eof,tab-in-indent diff --git a/td/telegram/MessageContent.h b/td/telegram/MessageContent.h index b4a7105a7..65d19c517 100644 --- a/td/telegram/MessageContent.h +++ b/td/telegram/MessageContent.h @@ -32,7 +32,6 @@ #include "td/utils/common.h" #include "td/utils/Status.h" -#include #include namespace td { diff --git a/td/telegram/MessageContentType.h b/td/telegram/MessageContentType.h index a01b9d3ea..d8dc3c507 100644 --- a/td/telegram/MessageContentType.h +++ b/td/telegram/MessageContentType.h @@ -9,6 +9,8 @@ #include "td/utils/common.h" #include "td/utils/StringBuilder.h" +#include + namespace td { enum class MessageContentType : int32 { diff --git a/tdutils/td/utils/AtomicRead.h b/tdutils/td/utils/AtomicRead.h index f64691020..a6d5c6ad7 100644 --- a/tdutils/td/utils/AtomicRead.h +++ b/tdutils/td/utils/AtomicRead.h @@ -13,7 +13,6 @@ #include #include #include -#include namespace td { From 7a0b88441a980171624f4727fd5f52d9db078730 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 8 Nov 2020 18:51:35 +0300 Subject: [PATCH 3/4] Add CentOS to build instructions generator. --- build.html | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/build.html b/build.html index 3c4d5541e..be7789692 100644 --- a/build.html +++ b/build.html @@ -54,6 +54,8 @@ select.large { font-size: large; } g++ - +

@@ -520,7 +520,7 @@ function onOptionsChanged() { } if (os_linux && linux_distro === 'Other') { var jdk = target === 'JNI' ? ', JDK ' : ''; - var compiler = use_clang ? 'clang++ >= 3.4' : 'g++ >= 4.9.2'; + var compiler = use_clang ? 'clang >= 3.4' : 'g++ >= 4.9.2'; pre_text.push('Install Git, ' + compiler + ', make, CMake >= 3.0.2, OpenSSL-dev, zlib-dev, gperf, PHP' + jdk + ' using your package manager.'); } if (os_linux && os.includes('Node.js')) { @@ -765,34 +765,6 @@ function onOptionsChanged() { commands.push('mkdir build'); commands.push('cd build'); - if (!use_msvc) { - var c_flags = []; - var cxx_flags = []; - - if (build_32bit) { - c_flags.push('-m32'); - cxx_flags.push('-m32'); - } else if (build_64bit) { - c_flags.push('-m64'); - cxx_flags.push('-m64'); - } - - if (os_linux) { - if (use_clang) { - cxx_flags.push('-stdlib=libc++'); - } else { - cxx_flags.push(''); - } - } - - if (c_flags.length) { - commands.push('export CFLAGS="' + c_flags.join(' ') + '"'); - } - if (cxx_flags.length) { - commands.push('export CXXFLAGS="' + cxx_flags.join(' ') + '"'); - } - } - cmake_init_options = getBacicCmakeInitOptions(); if (os_mac) { cmake_init_options.push('-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/'); @@ -824,7 +796,7 @@ function onOptionsChanged() { if (os_linux) { if (use_clang) { var clang_version_suffix = getClangVersionSuffix(); - prefix = 'CC=/usr/bin/clang' + clang_version_suffix + ' CXX=/usr/bin/clang++' + clang_version_suffix + ' '; + prefix = 'CXXFLAGS="-stdlib=libc++" CC=/usr/bin/clang' + clang_version_suffix + ' CXX=/usr/bin/clang++' + clang_version_suffix + ' '; if (use_lto) { options.push('-DCMAKE_AR=/usr/bin/llvm-ar' + clang_version_suffix); options.push('-DCMAKE_NM=/usr/bin/llvm-nm' + clang_version_suffix);