Lines Matching +full:clang +full:- +full:system

191             if path[-1] == name:
201 from_name = path[-1]
206 Return post-order list of node names.
219 Print pre-order node names with indentation denoting node depth level.
278 cmd = ["make", "-n", target]
289 "-j",
292 "-l",
295 "-O",
311 check_call_cmd("sudo", "-n", "--", "ldconfig")
345 raise Exception(f"Unable to find build system for {name}.")
389 "-j",
391 "--enable=style,performance,portability,missingInclude",
392 "--inline-suppr",
393 "--suppress=useStlAlgorithm",
394 "--suppress=unusedStructMember",
395 "--suppress=postfixOperator",
396 "--suppress=unreadVariable",
397 "--suppress=knownConditionTrueFalse",
398 "--library=googletest",
399 "--project=build/compile_commands.json",
400 f"--cppcheck-build-dir={cpp_dir}",
415 src = os.path.join(temp, "unit-test-vg.c")
416 exe = os.path.join(temp, "unit-test-vg")
433 ["gcc", "-O2", "-o", exe, src],
439 ["valgrind", "--error-exitcode=99", exe],
454 src = "unit-test-sanitize.c"
455 exe = "./unit-test-sanitize"
463 "-O2",
464 "-fsanitize=address",
465 "-fsanitize=undefined",
466 "-o",
475 # TODO - Sanitizer not working on ppc64le
476 # https://github.com/openbmc/openbmc-build-scripts/issues/31
493 via `make check-valgrind`. If the package does not have valgrind testing
503 if not make_target_exists("check-valgrind"):
507 cmd = make_parallel + ["check-valgrind"]
512 if re.search("test-suite-[a-z]+.log", f) is None:
521 via `make check-code-coverage`. If the package does not have code coverage
524 if not make_target_exists("check-code-coverage"):
529 cmd = make_parallel + ["check-code-coverage"]
539 which Autotools, Meson, CMake and possibly other build system drivers can
546 system
558 """Test if the build system driver can be applied to the package
560 Return True if the driver can drive the package's build system,
564 build system's configuration file(s).
575 data from the build system configuration.
592 Generally configure() is implemented by invoking the build system
631 Some analysis tools such as scan-build need injection into the build
632 system. analyze() provides the necessary hook to implement such
633 behaviour. Analyzers independent of the build system can also be
635 the build system driver implementations.
667 autoconf_cmdline = ["autoconf", "-Wno-undefined", "-"]
674 document = contents.encode("utf-8")
684 for match in re.compile(pattern).finditer(stdout.decode("utf-8")):
705 return "--" + ("enable" if enabled else "disable") + "-" + flag
710 self._configure_feature("silent-rules", False),
717 self._configure_feature("code-coverage", False),
734 check_call_cmd("sudo", "-n", "--", *(make_parallel + ["install"]))
735 check_call_cmd("sudo", "-n", "--", "ldconfig")
747 if "test-suite.log" not in files:
749 check_call_cmd("cat", os.path.join(root, "test-suite.log"))
771 "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
772 "-DCMAKE_CXX_FLAGS='-DBOOST_USE_VALGRIND'",
773 "-DITESTS=ON",
779 "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
780 "-DCMAKE_CXX_FLAGS='-DBOOST_USE_VALGRIND'",
787 "--build",
789 "--",
790 "-j",
795 check_call_cmd("sudo", "cmake", "--install", ".")
796 check_call_cmd("sudo", "-n", "--", "ldconfig")
803 if os.path.isfile(".clang-tidy"):
805 # clang-tidy needs to run on a clang-specific build
808 "-DCMAKE_C_COMPILER=clang",
809 "-DCMAKE_CXX_COMPILER=clang++",
810 "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
811 "-H.",
812 "-B" + build_dir,
816 "run-clang-tidy", "-header-filter=.*", "-p", build_dir
828 ["meson", "introspect", "--projectinfo", path],
830 ).decode("utf-8")
923 return "-D{}={}".format(key, str_val)
933 "-Db_colorout=never",
934 "-Dwerror=true",
935 "-Dwarning_level=3",
936 "-Dcpp_args='-DBOOST_USE_VALGRIND'",
939 # -Ddebug=true -Doptimization=g is helpful for abi-dumper but isn't a combination that
941 meson_flags.append("-Ddebug=true")
942 meson_flags.append("-Doptimization=g")
944 meson_flags.append("--buildtype=debugoptimized")
971 "meson", "setup", "--reconfigure", "build", *meson_flags
980 check_call_cmd("ninja", "-C", "build")
983 check_call_cmd("sudo", "-n", "--", "ninja", "-C", "build", "install")
984 check_call_cmd("sudo", "-n", "--", "ldconfig")
991 # project-under-test (otherwise an upstream dependency could fail
996 test_args = ("--repeat", str(args.repeat), "-C", "build")
997 check_call_cmd("meson", "test", "--print-errorlogs", *test_args)
1015 "-C",
1017 "--setup",
1025 output = output.decode("utf-8")
1042 "-t",
1044 "-C",
1046 "--print-errorlogs",
1047 "--setup",
1055 "-t",
1057 "-C",
1059 "--print-errorlogs",
1060 "--wrapper",
1061 "valgrind --error-exitcode=1",
1070 # Run clang-tidy only if the project has a configuration
1071 if os.path.isfile(".clang-tidy"):
1073 clang_env["CC"] = "clang"
1074 clang_env["CXX"] = "clang++"
1075 # Clang-20 currently has some issue with libstdcpp's
1077 # Adding -fno-builtin-std-forward_like causes them to go away.
1078 clang_env["CXXFLAGS"] = "-fno-builtin-std-forward_like"
1083 if not os.path.isfile(".openbmc-no-clang"):
1085 "meson", "compile", "-C", build_dir, env=clang_env
1090 "-C",
1092 "clang-tidy-fix",
1098 "-C",
1100 "--no-pager",
1105 # Run the basic clang static analyzer otherwise
1107 check_call_cmd("ninja", "-C", "build", "scan-build")
1110 # b_lundef is needed if clang++ is CXX since it resolves the
1116 meson_flags.append("-Db_sanitize=address,undefined")
1119 "meson", "setup", "--reconfigure", "build", *meson_flags
1127 "-C",
1129 "--print-errorlogs",
1130 "--logbase",
1131 "testlog-ubasan",
1135 # '-Db_sanitize=memory')
1136 # check_call_cmd('meson', 'test', '-C', 'build'
1137 # '--logbase', 'testlog-msan')
1140 "-Db_sanitize=address,undefined", "-Db_sanitize=none"
1146 "meson", "setup", "--reconfigure", "build", *meson_flags
1155 check_call_cmd("meson", "configure", "build", "-Db_coverage=true")
1160 check_call_cmd("ninja", "-C", "build", "coverage-html")
1162 check_call_cmd("meson", "configure", "build", "-Db_coverage=false")
1177 # identify this. Add to our unit-test checks so that we don't
1190 # identify this. Add to our unit-test checks so that we don't
1228 instances = (system(self.name, self.path) for system in self.supported)
1238 return {type(system): system for system in systems}[preferred]
1242 def install(self, system=None): argument
1243 if not system:
1244 system = self.build_system()
1246 system.configure(False)
1247 system.build()
1248 system.install()
1250 def _test_one(self, system): argument
1251 system.configure(True)
1252 system.build()
1253 system.install()
1254 system.test()
1256 system.analyze()
1259 for system in self.build_systems():
1260 self._test_one(system)
1279 if os.path.split(root)[-1] == "subprojects":
1281 subproject = ".".join(f.split(".")[0:-1])
1294 "phosphor-logging": [
1295 "--enable-metadata-processing",
1296 "--enable-openpower-pel-extension",
1297 "YAML_DIR=/usr/local/share/phosphor-dbus-yaml/yaml",
1303 "phosphor-dbus-interfaces": [
1304 "-Ddata_com_ibm=true",
1305 "-Ddata_org_open_power=true",
1307 "phosphor-logging": ["-Dopenpower-pel-extension=enabled"],
1312 "AC_CHECK_LIB": {"mapper": "phosphor-objmgr"},
1314 "host-ipmid": "phosphor-host-ipmid",
1315 "blobs-ipmid": "phosphor-ipmi-blobs",
1320 "phosphor-logging/log.hpp": "phosphor-logging",
1324 "phosphor-dbus-interfaces": "phosphor-dbus-interfaces",
1325 "libipmid": "phosphor-host-ipmid",
1326 "libipmid-host": "phosphor-host-ipmid",
1331 "phosphor-logging": "phosphor-logging",
1332 "phosphor-snmp": "phosphor-snmp",
1333 "ipmiblob": "ipmi-blob-tool",
1334 "hei": "openpower-libhei",
1335 "phosphor-ipmi-blobs": "phosphor-ipmi-blobs",
1336 "libcr51sign": "google-misc",
1349 DEPENDENCIES_REGEX = {"phosphor-logging": r"\S+-dbus-interfaces$"}
1354 "-w",
1355 "--workspace",
1361 "-p",
1362 "--package",
1368 "-t",
1369 "--test-only",
1377 "--no-cppcheck",
1386 "--integration-tests",
1394 "--no-integration-tests",
1401 "-v",
1402 "--verbose",
1407 "-r", "--repeat", help="Repeat tests N times", type=int, default=1
1410 "-b",
1411 "--branch",
1418 "-n",
1419 "--noformat",
1447 # Run format-code.sh, which will in turn call any repo-level formatters.
1451 WORKSPACE, "openbmc-build-scripts", "scripts", "format-code.sh"
1458 "git", "-C", CODE_SCAN_DIR, "--no-pager", "diff", "--exit-code"
1464 print("No valid build system, exit")
1499 ci_scripts = find_file(["run-ci.sh", "run-ci"], CODE_SCAN_DIR)