aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilyaonoff <ilyaonoff@yandex-team.com>2023-11-23 11:27:10 +0300
committerilyaonoff <ilyaonoff@yandex-team.com>2023-11-23 12:18:48 +0300
commitccffd11087d1a5902a4665b97ff6a3dc645d3649 (patch)
tree0c07543b5759dddcaa345855def035966faf285f
parent44354d0fc55926c1d4510d1d2c9c9f6a1a5e9300 (diff)
downloadydb-ccffd11087d1a5902a4665b97ff6a3dc645d3649.tar.gz
Add the ability to change LINK_SIZE when building
-rw-r--r--contrib/libs/pcre/pcre16/ya.make6
-rw-r--r--contrib/libs/pcre/pcre32/ya.make6
-rw-r--r--contrib/libs/pcre/pcre_config.h4
-rw-r--r--contrib/libs/pcre/pcrecpp/ya.make6
-rw-r--r--contrib/libs/pcre/ya.make6
5 files changed, 28 insertions, 0 deletions
diff --git a/contrib/libs/pcre/pcre16/ya.make b/contrib/libs/pcre/pcre16/ya.make
index 022b24ccaf..3b8778291b 100644
--- a/contrib/libs/pcre/pcre16/ya.make
+++ b/contrib/libs/pcre/pcre16/ya.make
@@ -18,6 +18,12 @@ CFLAGS(
-DHAVE_CONFIG_H
)
+IF(PCRE_LINK_SIZE)
+ CFLAGS(
+ -DPCRE_LINK_SIZE=$PCRE_LINK_SIZE
+ )
+ENDIF()
+
SRCDIR(contrib/libs/pcre)
SRCS(
diff --git a/contrib/libs/pcre/pcre32/ya.make b/contrib/libs/pcre/pcre32/ya.make
index 718045f447..2a619a9d4c 100644
--- a/contrib/libs/pcre/pcre32/ya.make
+++ b/contrib/libs/pcre/pcre32/ya.make
@@ -18,6 +18,12 @@ CFLAGS(
-DHAVE_CONFIG_H
)
+IF(PCRE_LINK_SIZE)
+ CFLAGS(
+ -DPCRE_LINK_SIZE=$PCRE_LINK_SIZE
+ )
+ENDIF()
+
SRCDIR(contrib/libs/pcre)
SRCS(
diff --git a/contrib/libs/pcre/pcre_config.h b/contrib/libs/pcre/pcre_config.h
index 7c3352964a..09b40b4cf8 100644
--- a/contrib/libs/pcre/pcre_config.h
+++ b/contrib/libs/pcre/pcre_config.h
@@ -159,7 +159,11 @@ sure both macros are undefined; an emulation function will then be used. */
compiled patterns up to 64K long. This covers the vast majority of cases.
However, PCRE can also be compiled to use 3 or 4 bytes instead. This allows
for longer patterns in extreme cases. */
+#ifdef PCRE_LINK_SIZE
+#define LINK_SIZE PCRE_LINK_SIZE
+#else
#define LINK_SIZE 2
+#endif
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
diff --git a/contrib/libs/pcre/pcrecpp/ya.make b/contrib/libs/pcre/pcrecpp/ya.make
index 6bc75935f3..392a20c3ba 100644
--- a/contrib/libs/pcre/pcrecpp/ya.make
+++ b/contrib/libs/pcre/pcrecpp/ya.make
@@ -22,6 +22,12 @@ CFLAGS(
-DHAVE_CONFIG_H
)
+IF(PCRE_LINK_SIZE)
+ CFLAGS(
+ -DPCRE_LINK_SIZE=$PCRE_LINK_SIZE
+ )
+ENDIF()
+
SRCDIR(contrib/libs/pcre)
SRCS(
diff --git a/contrib/libs/pcre/ya.make b/contrib/libs/pcre/ya.make
index d3345c87a2..6ce9c8264c 100644
--- a/contrib/libs/pcre/ya.make
+++ b/contrib/libs/pcre/ya.make
@@ -29,6 +29,12 @@ CFLAGS(
-DHAVE_CONFIG_H
)
+IF(PCRE_LINK_SIZE)
+ CFLAGS(
+ -DPCRE_LINK_SIZE=$PCRE_LINK_SIZE
+ )
+ENDIF()
+
# JIT adds ≈108KB to binary size which may be critical for mobile and embedded devices binary distributions
DEFAULT(ARCADIA_PCRE_ENABLE_JIT yes)