Opened 5 years ago

Closed 4 years ago

Last modified 12 months ago

#9500 closed feature request (fixed)

Allow GHC defaults to be modified with an environment variable

Reported by: dfeuer Owned by:
Priority: lowest Milestone:
Component: Build System (make) Version: 7.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


I wanted to do this to turn -fsimple-list-literals on and off for NoFib without editing a million makefiles or recompiling GHC, but I bet there are other reasons. GHC's validate should probably prompt the user to verify they want to continue of the variable is set, and should issue a loud warning at the very end indicating what options were set by the variable.

Change History (6)

comment:1 Changed 5 years ago by carter

Might be simpler to just patch NoFib to read off an ENV Var for additional flags, have you dug into doing that? I'm happy to help you figure out a patch for that. Much simpler (and safer) than patching ghc to read off env vars always

comment:2 Changed 5 years ago by carter

I think is all you need to modify to change the flags passed everywhere.

edit: reading more closely, that file says its not the place where additional options should be added, BUT one of those files in the mk directory should suite

Last edited 5 years ago by carter (previous) (diff)

comment:3 Changed 5 years ago by dfeuer

Priority: normallowest

comment:4 Changed 5 years ago by thomie

Component: CompilerBuild System

Someone who understands the build system might be able to tell you.

comment:5 in reply to:  4 Changed 4 years ago by thomie

Resolution: fixed
Status: newclosed

Replying to thomie:

Someone who understands the build system might be able to tell you.

That would be me now.

The documentation says to use EXTRA_HC_OPTS. I checked, and that should indeed work. Please reopen if it doesn't.

comment:6 Changed 12 months ago by bgamari

Component: Build SystemBuild System (make)

The new Hadrian build system has been merged. Relabeling the tickets concerning the legacy make build system to prevent confusion.

Note: See TracTickets for help on using tickets.