diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-12-08 11:08:37 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-11 11:15:06 -0800 |
commit | 4b0b44aface1cd9ed073733dd80b040b5aaf4c99 (patch) | |
tree | 3150d4f22c7f179edc276b3f9a707c7b74dd9ab4 /mesonbuild/linkers.py | |
parent | f202da0689795ba4330581e69a879f089e169f6c (diff) | |
download | meson-4b0b44aface1cd9ed073733dd80b040b5aaf4c99.zip meson-4b0b44aface1cd9ed073733dd80b040b5aaf4c99.tar.gz meson-4b0b44aface1cd9ed073733dd80b040b5aaf4c99.tar.bz2 |
move handling of CFLAGS and friends to environment
This has a bunch of nice features. It obviously centralizes everything,
which is nice. It also means that env is only re-read at `meson --wipe`,
not `meson --reconfigure`. And it's going to allow more cleanups.
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r-- | mesonbuild/linkers.py | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 8dae94c..86e6aac 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -18,7 +18,6 @@ import typing as T from . import mesonlib from .arglist import CompilerArgs -from .envconfig import get_env_var if T.TYPE_CHECKING: from .coredata import KeyedOptionDictType @@ -301,21 +300,7 @@ def evaluate_rpath(p: str, build_dir: str, from_dir: str) -> str: else: return os.path.relpath(os.path.join(build_dir, p), os.path.join(build_dir, from_dir)) - -class LinkerEnvVarsMixin(metaclass=abc.ABCMeta): - - """Mixin reading LDFLAGS from the environment.""" - - @staticmethod - def get_args_from_envvars(for_machine: mesonlib.MachineChoice, - is_cross: bool) -> T.List[str]: - raw_value = get_env_var(for_machine, is_cross, 'LDFLAGS') - if raw_value is not None: - return mesonlib.split_args(raw_value) - else: - return [] - -class DynamicLinker(LinkerEnvVarsMixin, metaclass=abc.ABCMeta): +class DynamicLinker(metaclass=abc.ABCMeta): """Base class for dynamic linkers.""" |