blob: ab9cf36ce80ef4de36f281b0e188992531c71f26 [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/evergreen/x64/platform_configuration" ]
} 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" ]
if (sb_is_modular && !sb_is_evergreen) {
libs = [ "//third_party/libvpx/platforms/linux-x64/libvpx.so.6" ]
ldflags = [ "-Wl,-rpath=" + rebase_path("//") +
"/third_party/libvpx/platforms/linux-x64/" ]
} else {
libs = [ "//third_party/libvpx/platforms/linux-x64/libvpx.a" ]
}
}
config("linker_flags") {
ldflags = [
"-Wl,-rpath=\$ORIGIN/lib",
# Cleanup unused sections
"-Wl,-gc-sections",
]
}