未验证 提交 7dfbe577 编写于 作者: O openharmony_ci 提交者: Gitee

!587 Add iccarm_link_helper.sh for iccarm toolchain

Merge pull request !587 from weifulun/link_helper
......@@ -101,8 +101,8 @@ template("iccarm_toolchain") {
if (need_strip) {
unstripped_outfile = "{{output_dir}}/unstripped/bin/{{target_output_name}}{{output_extension}}"
}
command += "$ld {{ldflags}} $extra_ldflags " +
"{{inputs}} {{libs}} -o $unstripped_outfile"
link_helper = rebase_path("//build/lite/toolchain/iccarm_link_helper.sh")
command += "$ld {{ldflags}} $extra_ldflags \$($link_helper {{inputs}} {{libs}}) -o $unstripped_outfile"
if (need_strip) {
command += " && $strip \"$unstripped_outfile\" \"$outfile\""
}
......
#!/bin/bash
# Copyright (c) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -e
ret=""
for obj in "$@"; do
case "${obj}" in
*.a) ret="${ret} --whole_archive ${obj}" ;;
*) ret="${ret} ${obj}" ;;
esac
done
echo "${ret}"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册