Frage

nasm has a bug on Windows (at least, possibly other platforms) which requires include paths to have trailing slashes. waf strips trailing slashes on paths by design. Bug report.

Obviously this causes a problem; asm files can't source include files. The elegant solution would be to fix nasm, however, given this bug exists in the public distribution of nasm and the bug is unassigned, this will be untenable for most.

The other option is to make waf tolerant of this bug.

War es hilfreich?

Lösung

This hack re-adds the trailing slashes in the include path list for all asm tasks after they've been stripped.

Simply add the following code to the top level wscript:

import os

from waflib import TaskGen

@TaskGen.feature("asm")
@TaskGen.after_method("apply_incpaths")
def add_includes_paths(self):
    self.env.INCPATHS = [os.path.join(x, "") for x in self.env.INCPATHS]
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top