blob: 988753fad95dd572b23d49646db1540079295400 [file] [log] [blame]
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -Ceu
if [[ ! -d "$prefix" ]]; then
echo "Usage: $0 toolchain-prefix"
exit 1
# Redirectors on *nix:
# The purpose of redirectors on *nix is to provide convenience wrappers, for
# example to emulate 32-bit compiler by calling 64-bit compiler with -m32.
# Another purpose of redirectors is to save space by replacing duplicate
# binaries with wrappers or links.
# Symbolic links vs. hard links:
# On windows/cygwin, hard links are needed to run linked programs outside of
# the cygwin shell. On *nix, there is no usage difference.
# Here we handle only the *nix case and use the symbolic links.
while read src dst arg; do
if [[ -e "$prefix/$(dirname "$src")/$dst" ]]; then
./ "$prefix/$src" "$dst" "$arg"
done < redirect_table.txt