blob: 32c24f6a7049310e7be52785830a4e1fa9bd493a [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 &&
build_with_separate_cobalt_toolchain) {
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 (build_with_separate_cobalt_toolchain) {
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",
]
}