MCPcopy Create free account
hub / github.com/Samsung/UTopia / make_autofuzz_src_cmd

Method make_autofuzz_src_cmd

helper/driverbuilder.py:135–158  ·  view source on GitHub ↗
(
        self, src: Path, output_dir: Path, base_cmd: CMD
    )

Source from the content-addressed store, hash-verified

133 ]
134
135 def make_autofuzz_src_cmd(
136 self, src: Path, output_dir: Path, base_cmd: CMD
137 ) -> CMD:
138 sources = base_cmd.sources(False)
139
140 cmd = base_cmd.cmd
141 cmd = cmd.replace(str(sources[0]), str(src))
142 for source in sources[1:]:
143 cmd = cmd.replace(str(source), "")
144
145 obj_path = output_dir / f"{src.name}.o"
146
147 tokens = cmd.split()
148 tokens[0] = "clang++"
149
150 output = base_cmd.output(False)
151 for i in range(0, len(tokens)):
152 if tokens[i] == str(output):
153 tokens[i] = str(obj_path)
154 cmd = " ".join(tokens)
155 cmd += " -I/usr/local/include/libprotobuf-mutator"
156
157 cmd = cmd.replace("std=gnu89", "")
158 return CMD(cmd, base_cmd.path)
159
160 def get_link_cmd(
161 self, name: str, extra_objs: List[Path], libs: List[str], profile: bool

Callers 1

Calls 3

CMDClass · 0.90
sourcesMethod · 0.80
outputMethod · 0.80

Tested by

no test coverage detected