2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 01:46:15 +01:00

Use relative paths in apply_incpaths by default

Relative paths are usually best for for specialized compilers (emscripten),
so this is for convenience. Absolute paths are usually faster.
This commit is contained in:
Thomas Nagy 2016-03-17 22:56:34 +01:00
parent ddead0ed59
commit 017d8fd39e
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
4 changed files with 2 additions and 15 deletions

View File

@ -27,4 +27,5 @@ NEW IN WAF 1.9
- Remove Utils.nogc - Remove Utils.nogc
- Modify Utils.run_once so that it accepts a list of *args - Modify Utils.run_once so that it accepts a list of *args
- Improve the task consumer in Runner.py - Improve the task consumer in Runner.py
- Use relative paths in apply_incpaths by default (and absolute ones when paths cross drives)

1
TODO
View File

@ -4,7 +4,6 @@ Waf 1.9
* Better consistency between check_cfg and check_cc variables * Better consistency between check_cfg and check_cc variables
* Let more context commands depend on the configuration * Let more context commands depend on the configuration
* Rework qt5 * Rework qt5
* Use relative paths in apply_incpaths (and absolute ones when paths cross drives)
* Regexps for extension-based processing * Regexps for extension-based processing
* Other issues listed on https://github.com/waf-project/waf/issues * Other issues listed on https://github.com/waf-project/waf/issues

View File

@ -120,7 +120,7 @@ def apply_incpaths(self):
lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES']) lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES'])
self.includes_nodes = lst self.includes_nodes = lst
self.env['INCPATHS'] = [x.abspath() for x in lst] self.env['INCPATHS'] = [x.path_from(self.bld.bldnode) for x in lst]
class link_task(Task.Task): class link_task(Task.Task):
""" """

View File

@ -82,16 +82,3 @@ def configure(conf):
conf.env.cxxprogram_PATTERN = '%s.html' conf.env.cxxprogram_PATTERN = '%s.html'
conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import']) conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import'])
@feature('c', 'cxx', 'acm', 'includes')
@after_method('propagate_uselib_vars', 'process_source', 'apply_incpaths')
def apply_incpaths_emscripten(self):
"""
Emscripten doesn't like absolute include paths
"""
# TODO: in waf 1.9 we can switch back to bldnode as the default since path_from handles cross-drive paths
if self.env.CC_NAME != 'emscripten' or self.env.CC_NAME != 'emscripten':
return
lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES'])
self.includes_nodes = lst
self.env['INCPATHS'] = [x.path_from(self.bld.bldnode) for x in lst]