12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #pragma once
-
- #include <vector>
- #include <string>
-
- namespace toolchain {
-
- enum FileType {
- C, CXX,
- };
-
- enum TargetType {
- BINARY,
- SHARED_LIBRARY,
- STATIC_LIBRARY,
- };
-
- std::string objectFilePath(const std::string &path, const std::string &outDir);
- std::string targetFilePath(
- TargetType type,
- const std::string &path,
- const std::string &outDir);
-
- void getPkgConfigFlags(const std::vector<std::string> &pkgs, std::vector<std::string> &flags);
- void getPkgConfigLDLibs(const std::vector<std::string> &pkgs, std::vector<std::string> &flags);
-
- std::vector<std::string> getDependencies(
- const std::vector<std::string> &flags,
- FileType type,
- const std::string &path);
-
- std::vector<std::string> getCompileCommand(
- const std::vector<std::string> &flags,
- FileType type,
- const std::string &path,
- const std::string &outDir);
-
- // TODO: Don't rely on FileType, just use LD and let the dependency graph nodes
- // provide the necessary flags to link with libstdc++
- std::vector<std::string> getLinkCommand(
- const std::vector<std::string> &ldFlags,
- const std::vector<std::string> &ldLibs,
- FileType type,
- TargetType targetType,
- const std::vector<std::string> &objs,
- const std::string &path,
- const std::string &outDir);
-
- }
|