Skip to content
  • Matthew Pickering's avatar
    9789ea8e
    Teach -fno-code about -fprefer-byte-code · 9789ea8e
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This patch teachs the code generation logic of -fno-code about
    -fprefer-byte-code, so that if we need to generate code for a module
    which prefers byte code, then we generate byte code rather than object
    code.
    
    We keep track separately which modules need object code and which byte
    code and then enable the relevant code generation for each. Typically
    the option will be enabled globally so one of these sets should be empty
    and we will just turn on byte code or object code generation.
    
    We also fix the bug where we would generate code for a module which
    enables Template Haskell despite the fact it was unecessary.
    
    Fixes #22016
    9789ea8e
    Teach -fno-code about -fprefer-byte-code
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This patch teachs the code generation logic of -fno-code about
    -fprefer-byte-code, so that if we need to generate code for a module
    which prefers byte code, then we generate byte code rather than object
    code.
    
    We keep track separately which modules need object code and which byte
    code and then enable the relevant code generation for each. Typically
    the option will be enabled globally so one of these sets should be empty
    and we will just turn on byte code or object code generation.
    
    We also fix the bug where we would generate code for a module which
    enables Template Haskell despite the fact it was unecessary.
    
    Fixes #22016
Loading