Skip to content

Commit c362397

Browse files
committed
WIP Pass cc_wrapper its path via env var
The inherited RUNFILES_* environment variables aren't correct. Pass in a path to try and find the correct directory/manifest. Only prints currently.
1 parent 3a5c4fd commit c362397

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

haskell/cc.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ def cc_interop_info(ctx, override_cc_toolchain = None):
147147
env["CC_WRAPPER_PLATFORM"] = "linux"
148148

149149
env["CC_WRAPPER_CC_PATH"] = real_cc_path
150+
env["CC_WRAPPER_PATH"] = cc_wrapper.executable.path
150151
env["CC_WRAPPER_CPU"] = cc_toolchain.cpu
151152

152153
cc_libraries_info = deps_HaskellCcLibrariesInfo(

haskell/private/cc_wrapper.py.tpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,8 @@ def run_cc_print_file_name(filename, args):
10191019

10201020
def find_cc():
10211021
"""Find the path to the actual compiler executable."""
1022+
if "CC_WRAPPER_PATH" in os.environ:
1023+
print("CC_WRAPPER_PATH: {}".format(os.environ["CC_WRAPPER_PATH"]))
10221024
if os.path.isfile(CC):
10231025
cc = CC
10241026
else:
@@ -1035,6 +1037,7 @@ def find_cc():
10351037
sys.stderr.write("CC not found '{}'.\n".format(CC))
10361038
sys.exit(1)
10371039

1040+
print("find_cc returning: {}".format(cc))
10381041
return cc
10391042

10401043

0 commit comments

Comments
 (0)