blob: 8b64c964db3d763d922cdfb196d173db5ddaeeaa [file] [log] [blame]
# Copyright 2021 The Cobalt Authors. All Rights Reserved.
#
# 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.
config("platform_configuration") {
if (current_toolchain == default_toolchain && sb_is_modular &&
!sb_is_evergreen) {
configs = [ "//starboard/build/config/modular/x64" ]
ldflags = [ "-Wl,--gc-sections" ]
} else {
configs = [
":libraries",
"//starboard/linux/shared/platform_configuration",
"//starboard/linux/shared/platform_configuration:compiler_flags",
":linker_flags",
]
}
}
config("libraries") {
configs = [ "//starboard/linux/shared/platform_configuration:libraries" ]
}
config("linker_flags") {
ldflags = [
"-Wl,-rpath=\$ORIGIN/lib",
# Cleanup unused sections
"-Wl,-gc-sections",
]
}