Remove the method conf.add_as_needed because it does not check for the flag usage

This commit is contained in:
Thomas Nagy 2021-03-12 07:53:01 +01:00
parent bf5a825317
commit 28318c9cca
2 changed files with 10 additions and 20 deletions

View File

@ -7,6 +7,7 @@ CHANGES IN WAF 2.1.0
- Remove waflib.Task.TaskBase
- Remove the upper class of waflib.Task.Task (metaclass syntax)
- Remove Winphone/WinCE detection in msvc.py
- Remove conf.add_as_needed because it does not check for the flag usage
CHANGES IN WAF 2.0.0
--------------------
@ -20,12 +21,12 @@ CHANGES IN WAF 2.0.0
* Accept nested lists and generators in bld(source=...)
* Sort TaskGen methods in alphabetical order by reversing TaskGen.prec order
* Remove 'ut_fun' from waf_unit_test.py
* Remove Node.sig and Node.cache_sig
* Remove the BuildContext.rule decorator
* Remove Task.update_outputs, Task.always_run
* Remove atleast-version, exact-version and max-version from conf.check_cfg
* Remove c_preproc.trimquotes
* Remove field_name, type_name, function_name from conf.check() tests
* Remove extras/mem_reducer.py as a better solution has been merged
* Remove Utils.ex_stack (use traceback.format_exc())
- Remove 'ut_fun' from waf_unit_test.py
- Remove Node.sig and Node.cache_sig
- Remove the BuildContext.rule decorator
- Remove Task.update_outputs, Task.always_run
- Remove atleast-version, exact-version and max-version from conf.check_cfg
- Remove c_preproc.trimquotes
- Remove field_name, type_name, function_name from conf.check() tests
- Remove extras/mem_reducer.py as a better solution has been merged
- Remove Utils.ex_stack (use traceback.format_exc())

View File

@ -1158,17 +1158,6 @@ def get_suncc_version(conf, cc):
else:
conf.fatal('Could not determine the suncc version.')
# ============ the --as-needed flag should added during the configuration, not at runtime =========
@conf
def add_as_needed(self):
"""
Adds ``--as-needed`` to the *LINKFLAGS*
On some platforms, it is a default flag. In some cases (e.g., in NS-3) it is necessary to explicitly disable this feature with `-Wl,--no-as-needed` flag.
"""
if self.env.DEST_BINFMT == 'elf' and 'gcc' in (self.env.CXX_NAME, self.env.CC_NAME):
self.env.append_unique('LINKFLAGS', '-Wl,--as-needed')
# ============ parallel configuration
class cfgtask(Task.Task):