Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
844f48ea
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
大约 1 年 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
844f48ea
编写于
2月 10, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
2月 10, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix symbol exporting and libstdc++ linkage of hb-subset (#769)
上级
91519c6a
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
55 addition
and
39 deletion
+55
-39
CMakeLists.txt
CMakeLists.txt
+2
-4
src/Makefile.am
src/Makefile.am
+3
-0
src/check-defs.sh
src/check-defs.sh
+1
-1
src/check-libstdc++.sh
src/check-libstdc++.sh
+11
-9
src/check-symbols.sh
src/check-symbols.sh
+15
-13
src/hb-subset-glyf.cc
src/hb-subset-glyf.cc
+4
-4
src/hb-subset-glyf.hh
src/hb-subset-glyf.hh
+1
-1
src/hb-subset-plan.cc
src/hb-subset-plan.cc
+2
-2
src/hb-subset-plan.hh
src/hb-subset-plan.hh
+4
-4
src/hb-subset.cc
src/hb-subset.cc
+1
-1
src/hb-ucdn/Makefile.am
src/hb-ucdn/Makefile.am
+11
-0
未找到文件。
CMakeLists.txt
浏览文件 @
844f48ea
...
...
@@ -544,17 +544,15 @@ if (UNIX OR MINGW)
# Make symbols link locally
link_libraries
(
-Bsymbolic-functions
)
# Make sure we don't link to libstdc++
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
# Make sure we don't link to libstdc++
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fno-rtti -fno-exceptions"
)
set
(
CMAKE_CXX_IMPLICIT_LINK_LIBRARIES
"m"
)
# libm
set
(
CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES
""
)
set_target_properties
(
harfbuzz PROPERTIES LINKER_LANGUAGE C
)
set_target_properties
(
harfbuzz-subset PROPERTIES LINKER_LANGUAGE C
)
endif
()
# No threadsafe statics as we do it ourselves
if
(
BUILD_SHARED_LIBS
)
# No threadsafe statics as we do it ourselves
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fno-threadsafe-statics"
)
endif
()
endif
()
...
...
src/Makefile.am
浏览文件 @
844f48ea
...
...
@@ -136,6 +136,7 @@ pkgconfig_DATA = harfbuzz.pc
EXTRA_DIST
+=
harfbuzz.pc.in
lib_LTLIBRARIES
+=
libharfbuzz-subset.la
libharfbuzz_subset_la_LINK
=
$(libharfbuzz_la_LINK)
libharfbuzz_subset_la_SOURCES
=
$(HB_SUBSET_sources)
libharfbuzz_subset_la_CPPFLAGS
=
$(libharfbuzz_la_CPPFLAGS)
libharfbuzz_subset_la_LDFLAGS
=
$(libharfbuzz_la_LDFLAGS)
...
...
@@ -172,6 +173,7 @@ HBSOURCES += $(HB_ICU_sources)
HBHEADERS
+=
$(HB_ICU_headers)
else
lib_LTLIBRARIES
+=
libharfbuzz-icu.la
libharfbuzz_icu_la_LINK
=
$(libharfbuzz_la_LINK)
libharfbuzz_icu_la_SOURCES
=
$(HB_ICU_sources)
libharfbuzz_icu_la_CPPFLAGS
=
$(libharfbuzz_la_CPPFLAGS)
$(ICU_CFLAGS)
libharfbuzz_icu_la_LDFLAGS
=
$(libharfbuzz_la_LDFLAGS)
...
...
@@ -184,6 +186,7 @@ EXTRA_DIST += harfbuzz-icu.pc.in
if
HAVE_GOBJECT
lib_LTLIBRARIES
+=
libharfbuzz-gobject.la
libharfbuzz_gobject_la_LINK
=
$(libharfbuzz_la_LINK)
libharfbuzz_gobject_la_SOURCES
=
$(HB_GOBJECT_sources)
nodist_libharfbuzz_gobject_la_SOURCES
=
$(HB_GOBJECT_ENUM_sources)
libharfbuzz_gobject_la_CPPFLAGS
=
$(libharfbuzz_la_CPPFLAGS)
$(GOBJECT_CFLAGS)
...
...
src/check-defs.sh
浏览文件 @
844f48ea
...
...
@@ -27,7 +27,7 @@ for def in $defs; do
so
=
$libs
/lib
${
lib
}
.
$suffix
if
!
test
-f
"
$so
"
;
then continue
;
fi
# On mac, C symbols are prefixed with _
# On mac
OS
, C symbols are prefixed with _
if
test
$suffix
=
dylib
;
then
prefix
=
"_"
;
fi
EXPORTED_SYMBOLS
=
"
`
nm
"
$so
"
|
grep
' [BCDGINRSTVW] .'
|
grep
-v
"
$prefix
"
'\(_fini\>\|_init\>\|_fdata\>\|_ftext\>\|_fbss\>\|__bss_start\>\|__bss_start__\>\|__bss_end__\>\|_edata\>\|_end\>\|_bss_end__\>\|__end__\>\|__gcov_flush\>\|llvm_\)'
|
cut
-d
' '
-f3
`
"
...
...
src/check-libstdc++.sh
浏览文件 @
844f48ea
...
...
@@ -21,16 +21,18 @@ else
fi
tested
=
false
for
suffix
in
so dylib
;
do
so
=
$libs
/libharfbuzz.
$suffix
if
!
test
-f
"
$so
"
;
then continue
;
fi
for
soname
in
harfbuzz harfbuzz-icu harfbuzz-subset
;
do
for
suffix
in
so dylib
;
do
so
=
$libs
/lib
$soname
.
$suffix
if
!
test
-f
"
$so
"
;
then continue
;
fi
echo
"Checking that we are not linking to libstdc++ or libc++"
if
$LDD
$so
|
grep
'libstdc[+][+]\|libc[+][+]'
;
then
echo
"Ouch, linked to libstdc++ or libc++"
stat
=
1
fi
tested
=
true
echo
"Checking that we are not linking to libstdc++ or libc++"
if
$LDD
$so
|
grep
'libstdc[+][+]\|libc[+][+]'
;
then
echo
"Ouch, linked to libstdc++ or libc++"
stat
=
1
fi
tested
=
true
done
done
if
!
$tested
;
then
echo
"check-libstdc++.sh: libharfbuzz shared library not found; skipping test"
...
...
src/check-symbols.sh
浏览文件 @
844f48ea
...
...
@@ -17,24 +17,26 @@ fi
echo
"Checking that we are not exposing internal symbols"
tested
=
false
for
suffix
in
so dylib
;
do
so
=
$libs
/libharfbuzz.
$suffix
if
!
test
-f
"
$so
"
;
then continue
;
fi
for
soname
in
harfbuzz harfbuzz-icu harfbuzz-subset
;
do
for
suffix
in
so dylib
;
do
so
=
$libs
/lib
$soname
.
$suffix
if
!
test
-f
"
$so
"
;
then continue
;
fi
EXPORTED_SYMBOLS
=
"
`
nm
"
$so
"
|
grep
' [BCDGINRSTVW] .'
|
grep
-v
' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| ___gcov_flush\>\| llvm_\| _llvm_'
|
cut
-d
' '
-f3
`
"
EXPORTED_SYMBOLS
=
"
`
nm
"
$so
"
|
grep
' [BCDGINRSTVW] .'
|
grep
-v
' _fini\>\| _init\>\| _fdata\>\| _ftext\>\| _fbss\>\| __bss_start\>\| __bss_start__\>\| __bss_end__\>\| _edata\>\| _end\>\| _bss_end__\>\| __end__\>\| __gcov_flush\>\| ___gcov_flush\>\| llvm_\| _llvm_'
|
cut
-d
' '
-f3
`
"
prefix
=
`
basename
"
$so
"
|
sed
's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'
`
prefix
=
`
basename
"
$so
"
|
sed
's/libharfbuzz/hb/; s/-/_/g; s/[.].*//'
`
# On mac
, C symbols are prefixed with _
if
test
$suffix
=
dylib
;
then
prefix
=
"_
$prefix
"
;
fi
# On macOS
, C symbols are prefixed with _
if
test
$suffix
=
dylib
;
then
prefix
=
"_
$prefix
"
;
fi
echo
"Processing
$so
"
if
echo
"
$EXPORTED_SYMBOLS
"
|
grep
-v
"^
${
prefix
}
_
"
;
then
echo
"Ouch, internal symbols exposed"
stat
=
1
fi
echo
"Processing
$so
"
if
echo
"
$EXPORTED_SYMBOLS
"
|
grep
-v
"^
${
prefix
}
\(
_
\|
$\
)
"
;
then
echo
"Ouch, internal symbols exposed"
stat
=
1
fi
tested
=
true
tested
=
true
done
done
if
!
$tested
;
then
echo
"check-symbols.sh: no shared library found; skipping test"
...
...
src/hb-subset-glyf.cc
浏览文件 @
844f48ea
...
...
@@ -29,7 +29,7 @@
#include "hb-set.h"
#include "hb-subset-glyf.hh"
bool
HB_INTERNAL
bool
_calculate_glyf_and_loca_prime_size
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
hb_auto_array_t
<
unsigned
int
>
&
glyph_ids
,
bool
*
use_short_loca
,
/* OUT */
...
...
@@ -63,7 +63,7 @@ _calculate_glyf_and_loca_prime_size (const OT::glyf::accelerator_t &glyf,
return
true
;
}
void
HB_INTERNAL
void
_write_loca_entry
(
unsigned
int
id
,
unsigned
int
offset
,
bool
is_short
,
void
*
loca_prime
)
{
if
(
is_short
)
{
((
OT
::
HBUINT16
*
)
loca_prime
)
[
id
].
set
(
offset
/
2
);
...
...
@@ -72,7 +72,7 @@ _write_loca_entry (unsigned int id, unsigned int offset, bool is_short, void *lo
}
}
bool
HB_INTERNAL
bool
_write_glyf_and_loca_prime
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
const
char
*
glyf_data
,
hb_auto_array_t
<
unsigned
int
>
&
glyph_ids
,
...
...
@@ -110,7 +110,7 @@ _write_glyf_and_loca_prime (const OT::glyf::accelerator_t &glyf,
return
true
;
}
bool
HB_INTERNAL
bool
_hb_subset_glyf_and_loca
(
const
OT
::
glyf
::
accelerator_t
&
glyf
,
const
char
*
glyf_data
,
hb_auto_array_t
<
unsigned
int
>
&
glyphs_to_retain
,
...
...
src/hb-subset-glyf.hh
浏览文件 @
844f48ea
...
...
@@ -31,7 +31,7 @@
#include "hb-subset-plan.hh"
bool
HB_INTERNAL
bool
hb_subset_glyf_and_loca
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
face
,
bool
*
use_short_loca
,
/* OUT */
...
...
src/hb-subset-plan.cc
浏览文件 @
844f48ea
...
...
@@ -49,7 +49,7 @@ hb_subset_plan_new_gid_for_old_id (hb_subset_plan_t *plan,
return
false
;
}
void
HB_INTERNAL
void
_populate_codepoints
(
hb_set_t
*
input_codepoints
,
hb_auto_array_t
<
hb_codepoint_t
>&
plan_codepoints
)
{
...
...
@@ -62,7 +62,7 @@ _populate_codepoints (hb_set_t *input_codepoints,
plan_codepoints
.
qsort
(
_hb_codepoint_t_cmp
);
}
void
HB_INTERNAL
void
_populate_gids_to_retain
(
hb_face_t
*
face
,
hb_auto_array_t
<
hb_codepoint_t
>&
codepoints
,
hb_auto_array_t
<
hb_codepoint_t
>&
old_gids
,
...
...
src/hb-subset-plan.hh
浏览文件 @
844f48ea
...
...
@@ -45,20 +45,20 @@ struct hb_subset_plan_t {
typedef
struct
hb_subset_plan_t
hb_subset_plan_t
;
hb_subset_plan_t
*
HB_INTERNAL
hb_subset_plan_t
*
hb_subset_plan_create
(
hb_face_t
*
face
,
hb_subset_profile_t
*
profile
,
hb_subset_input_t
*
input
);
hb_bool_t
HB_INTERNAL
hb_bool_t
hb_subset_plan_new_gid_for_old_id
(
hb_subset_plan_t
*
plan
,
hb_codepoint_t
old_gid
,
hb_codepoint_t
*
new_gid
/* OUT */
);
hb_subset_plan_t
*
HB_INTERNAL
hb_subset_plan_t
*
hb_subset_plan_get_empty
();
void
HB_INTERNAL
void
hb_subset_plan_destroy
(
hb_subset_plan_t
*
plan
);
#endif
/* HB_SUBSET_PLAN_HH */
src/hb-subset.cc
浏览文件 @
844f48ea
...
...
@@ -108,7 +108,7 @@ hb_subset_input_destroy(hb_subset_input_t *subset_input)
}
template
<
typename
TableType
>
hb_blob_t
*
HB_INTERNAL
hb_blob_t
*
_subset
(
hb_subset_plan_t
*
plan
,
hb_face_t
*
source
)
{
OT
::
Sanitizer
<
TableType
>
sanitizer
;
...
...
src/hb-ucdn/Makefile.am
浏览文件 @
844f48ea
...
...
@@ -4,6 +4,17 @@ noinst_LTLIBRARIES = libhb-ucdn.la
include
Makefile.sources
if
OS_WIN32
libhb_ucdn_la_LINK
=
$(CXXLINK)
else
# Use a C linker for GCC, not C++; Don't link to libstdc++
if
HAVE_GCC
libhb_ucdn_la_LINK
=
$(LINK)
else
libhb_ucdn_la_LINK
=
$(CXXLINK)
endif
endif
libhb_ucdn_la_SOURCES
=
$(LIBHB_UCDN_sources)
libhb_ucdn_la_CPPFLAGS
=
\
-I
$(top_srcdir)
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录