Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oceanbase
提交
966f8f8d
O
oceanbase
项目概览
oceanbase
/
oceanbase
8 个月 前同步成功
通知
260
Star
6084
Fork
1301
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oceanbase
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
966f8f8d
编写于
4月 23, 2024
作者:
D
dimstars
提交者:
ob-robot
4月 23, 2024
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ENABLE_HOTFUNC to control HOTFUNC_OPT
上级
16d0c2d3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
4 deletion
+9
-4
build.sh
build.sh
+2
-2
cmake/Env.cmake
cmake/Env.cmake
+7
-2
未找到文件。
build.sh
浏览文件 @
966f8f8d
...
...
@@ -146,7 +146,7 @@ function do_clean
function
build_package
{
STATIC_LINK_LGPL_DEPS_OPTION
=
OFF
do_build
"
$@
"
-DOB_BUILD_PACKAGE
=
ON
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DOB_USE_LLD
=
$LLD_OPTION
-DENABLE_FATAL_ERROR_HANG
=
OFF
-DENABLE_AUTO_FDO
=
ON
-DENABLE_THIN_LTO
=
ON
-DOB_STATIC_LINK_LGPL_DEPS
=
$STATIC_LINK_LGPL_DEPS_OPTION
do_build
"
$@
"
-DOB_BUILD_PACKAGE
=
ON
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DOB_USE_LLD
=
$LLD_OPTION
-DENABLE_FATAL_ERROR_HANG
=
OFF
-DENABLE_AUTO_FDO
=
ON
-DENABLE_THIN_LTO
=
ON
-D
ENABLE_HOTFUNC
=
ON
-D
OB_STATIC_LINK_LGPL_DEPS
=
$STATIC_LINK_LGPL_DEPS_OPTION
}
# build - configurate project and prepare to compile, by calling make
...
...
@@ -184,7 +184,7 @@ function build
ln
-sf
${
TOPDIR
}
/build_clangd/compile_commands.json
${
TOPDIR
}
/compile_commands.json
;;
xperf
)
do_build
"
$@
"
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DENABLE_AUTO_FDO
=
ON
-DENABLE_THIN_LTO
=
ON
-DOB_USE_LLD
=
$LLD_OPTION
do_build
"
$@
"
-DCMAKE_BUILD_TYPE
=
RelWithDebInfo
-DENABLE_AUTO_FDO
=
ON
-DENABLE_THIN_LTO
=
ON
-DOB_USE_LLD
=
$LLD_OPTION
-DENABLE_HOTFUNC
=
ON
;;
xdebug_asan
)
do_build
"
$@
"
-DCMAKE_BUILD_TYPE
=
Debug
-DOB_USE_LLD
=
$LLD_OPTION
-DOB_USE_ASAN
=
$ASAN_OPTION
...
...
cmake/Env.cmake
浏览文件 @
966f8f8d
...
...
@@ -68,6 +68,11 @@ if(ENABLE_THIN_LTO)
set
(
THIN_LTO_CONCURRENCY_LINK
"-Wl,--thinlto-jobs=
${
LTO_JOBS
}
"
)
endif
()
set
(
HOTFUNC_OPT
""
)
if
(
ENABLE_HOTFUNC
)
set
(
HOTFUNC_OPT
"-Wl,--no-warn-symbol-ordering,--symbol-ordering-file,
${
HOTFUNC_PATH
}
"
)
endif
()
set
(
ob_close_modules_static_name
""
)
set
(
ob_close_deps_static_name
""
)
...
...
@@ -201,7 +206,7 @@ if (OB_USE_CLANG)
if
(
OB_USE_LLD
)
set
(
LD_OPT
"-fuse-ld=
${
DEVTOOLS_DIR
}
/bin/ld.lld"
)
set
(
REORDER_COMP_OPT
"-ffunction-sections -fdebug-info-for-profiling"
)
set
(
REORDER_LINK_OPT
"-Wl,--no-rosegment,--build-id=sha1
,--no-warn-symbol-ordering,--symbol-ordering-file,
${
HOTFUNC_PATH
}
"
)
set
(
REORDER_LINK_OPT
"-Wl,--no-rosegment,--build-id=sha1
${
HOTFUNC_OPT
}
"
)
set
(
OB_LD_BIN
"
${
DEVTOOLS_DIR
}
/bin/ld.lld"
)
endif
()
set
(
CMAKE_CXX_FLAGS
"--gcc-toolchain=
${
GCC9
}
${
DEBUG_PREFIX
}
${
AUTO_FDO_OPT
}
${
THIN_LTO_OPT
}
-fcolor-diagnostics
${
REORDER_COMP_OPT
}
-fmax-type-align=8
${
CMAKE_ASAN_FLAG
}
-std=gnu++11"
)
...
...
@@ -233,7 +238,7 @@ else()
if
(
OB_USE_LLD
)
set
(
LD_OPT
"-B
${
CMAKE_SOURCE_DIR
}
/rpm/.compile"
)
set
(
REORDER_COMP_OPT
"-ffunction-sections"
)
set
(
REORDER_LINK_OPT
"
-Wl,--no-warn-symbol-ordering,--symbol-ordering-file,
${
HOTFUNC_PATH
}
"
)
set
(
REORDER_LINK_OPT
"
${
HOTFUNC_OPT
}
"
)
endif
()
set
(
CMAKE_CXX_FLAGS
"
${
LD_OPT
}
-fdiagnostics-color
${
REORDER_COMP_OPT
}
"
)
set
(
CMAKE_C_FLAGS
"
${
LD_OPT
}
-fdiagnostics-color
${
REORDER_COMP_OPT
}
"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录