2019-06-16 16:42:48 +03:00
|
|
|
#!/usr/bin/env bash
|
2020-01-02 23:21:13 +03:00
|
|
|
# Copyright (c) 2020 The DAML Authors. All rights reserved.
|
2019-06-16 16:42:48 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2019-07-01 18:30:13 +03:00
|
|
|
ENV_FILE=$1
|
|
|
|
ARGS_FILE=$2
|
2019-11-12 15:15:31 +03:00
|
|
|
RULES_HASKELL_EXEC_ROOT=bazel-$(basename ${BUILD_WORKSPACE_DIRECTORY})/
|
|
|
|
# Setting -pgm* flags explicitly has the unfortunate side effect
|
|
|
|
# of resetting any program flags in the GHC settings file. So we
|
|
|
|
# restore them here. See
|
|
|
|
# https://ghc.haskell.org/trac/ghc/ticket/7929.
|
|
|
|
PGM_ARGS="-pgma {CC} -pgmc {CC} -pgml {CC} -pgmP {CC} -optc-fno-stack-protector -optP-E -optP-undef -optP-traditional"
|
2019-07-01 18:30:13 +03:00
|
|
|
echo "{ENV}" > "$ENV_FILE"
|
2019-11-12 15:15:31 +03:00
|
|
|
echo $PGM_ARGS "{ARGS}" > "$ARGS_FILE"
|