mirror of https://gitlab.com/ita1024/waf.git
extras: file_to_object: basic file name escape (fixes issue on Windows)
This commit is contained in:
parent
c47b9bcd85
commit
340551d8a0
|
@ -37,6 +37,10 @@ import os, binascii
|
|||
|
||||
from waflib import Task, Utils, TaskGen, Errors
|
||||
|
||||
|
||||
def filename_c_escape(x):
|
||||
return x.replace("\\", "\\\\")
|
||||
|
||||
class file_to_object_s(Task.Task):
|
||||
color = 'CYAN'
|
||||
dep_vars = ('DEST_CPU', 'DEST_BINFMT')
|
||||
|
@ -59,6 +63,7 @@ class file_to_object_s(Task.Task):
|
|||
else:
|
||||
raise Errors.WafError("Unsupported DEST_CPU, please report bug!")
|
||||
|
||||
file = filename_c_escape(file)
|
||||
name = "_binary_" + "".join(name)
|
||||
rodata = ".section .rodata"
|
||||
if self.env.DEST_BINFMT == "mac-o":
|
||||
|
|
Loading…
Reference in New Issue