feat: Loading compiler options from a configuration file #10
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Summary
Introduce support for
.cfgconfiguration files, allowing developers to define and reuse sets of compiler options.This simplifies the build process, eliminates long and repetitive command-line strings, and makes managing different build profiles (e.g., debug, release) straightforward.
The primary way to use this feature is through the new
-Tcommand line option, which allows you to specify the path to a custom configuration file.How It Works
The compiler can now load options directly from a
.cfgfile.The mechanism for finding and loading these files is as follows:
Custom configuration via
-T<your.cfg>(highest priority)/or\),the compiler uses the path as-is.
targetdirectory located alongside the compiler executable.For example,
amxxpc -Treleasewill cause the compiler to look for<compiler_path>/target/release.cfg.Default configurations (if
-Tis not used)If no
-Toption is given, the compiler will search for a default configuration file in the following order:default.cfginside thetargetdirectory (target/default.cfg).pawn.cfgin the same directory as the compiler executable.Option Precedence
Options are applied in a clear order:
.cfgfile.This means that options on the command line will always override those in the configuration file.
How to Use
Example
default.cfgFileHere is a comprehensive example of a
target/default.cfgfile, demonstrating how various options can be set: