• Kevin Locke's avatar
    configurator: Add output cflag option and macro · aacc2cb8
    Kevin Locke authored
    Unfortunately, not all compilers support -o as a command-line option for
    specifying the output file.  Visual Studio cl.exe issues warning D9035
    when -o is given, which is detected as a compile warning by the
    configurator.
    
    To support such compilers, add the command-line option -O to
    configurator which can be used to specify the cflag for setting the
    output executable file name.  Additionally define the macro
    CCAN_OUTPUT_EXE_CFLAG in config.h and use it when invoking the compiler
    (e.g.  from ccanlint).
    
    For reference, the name CCAN_OUTPUT_EXE_CFLAG was chosen to avoid
    potential name conflicts in the future due to cl.exe requiring different
    flags for different types of output[1] (e.g. object files are /Fo:).
    
    1.  https://msdn.microsoft.com/en-us/library/f1cb223a.aspxSigned-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    aacc2cb8
compile.c 1.75 KB