Opened 3 years ago

Closed 2 years 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 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 (5)

comment:1 Changed 3 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 3 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 3 years ago by carter (previous) (diff)

comment:3 Changed 3 years ago by dfeuer

Priority: normallowest

comment:4 Changed 3 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 2 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.

Note: See TracTickets for help on using tickets.