SWDEV-465520: RHEL9 toolchain doesnt seem to support experimental filesystem
Change-Id: I6b1e7f42c49b1c7af412c0b68851724861c9970a
Этот коммит содержится в:
коммит произвёл
Ammar Elwazir
родитель
140f658820
Коммит
1e69b3e2f6
@@ -24,7 +24,6 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <experimental/filesystem>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <optional>
|
||||
@@ -36,8 +35,9 @@
|
||||
#include "src/utils/helper.h"
|
||||
#include "src/utils/logger.h"
|
||||
#include "src/core/memory/generic_buffer.h"
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
#define ASSERTM(exp, msg) assert(((void)msg, exp))
|
||||
|
||||
extern std::mutex sessions_pending_signal_lock;
|
||||
|
||||
@@ -35,7 +35,6 @@ THE SOFTWARE.
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <experimental/filesystem>
|
||||
|
||||
#include "types.h"
|
||||
#include "exception.h"
|
||||
@@ -45,9 +44,10 @@ THE SOFTWARE.
|
||||
#include <unordered_set>
|
||||
#include "src/core/hardware/hsa_info.h"
|
||||
#include "src/core/hsa/hsa_support.h"
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
namespace rocprofiler {
|
||||
struct counter_t {
|
||||
std::string name;
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
|
||||
#include "hsa_info.h"
|
||||
#include <fstream>
|
||||
#include <experimental/filesystem>
|
||||
|
||||
#include "src/utils/filesystem.hpp"
|
||||
#include "src/utils/helper.h"
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
|
||||
#define CHECK_STATUS(msg, status) \
|
||||
do { \
|
||||
|
||||
@@ -26,11 +26,10 @@
|
||||
#include <link.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <experimental/filesystem>
|
||||
|
||||
#include "src/utils/helper.h"
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
|
||||
namespace roctracer {
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ Copyright (c) 2022 Advanced Micro Devices, Inc.
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
#include <cstdlib>
|
||||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -39,8 +38,10 @@ Copyright (c) 2022 Advanced Micro Devices, Inc.
|
||||
#include <fmt/core.h>
|
||||
#include <fmt/color.h>
|
||||
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
// filesystem for path resolutions
|
||||
namespace fs = std::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
|
||||
namespace rocprofiler {
|
||||
namespace src {
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <experimental/filesystem>
|
||||
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
/*
|
||||
mpiexec -n 16 rocsys --session-new test launch python app.py
|
||||
@@ -47,7 +48,7 @@ struct shmd_t {
|
||||
struct shmd_t* shmd;
|
||||
} // namespace
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
|
||||
void report(const char* msg, int terminate) {
|
||||
std::cerr << msg << ": " << errno << std::endl;
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
#include <cstdlib>
|
||||
#include <csetjmp>
|
||||
#include <exception>
|
||||
#include <experimental/filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
@@ -60,6 +59,7 @@
|
||||
#include "utils/helper.h"
|
||||
#include "trace_buffer.h"
|
||||
#include "core/session/att/att.h"
|
||||
#include "src/utils/filesystem.hpp"
|
||||
|
||||
|
||||
struct PluginHeaderPacket {
|
||||
@@ -69,7 +69,7 @@ struct PluginHeaderPacket {
|
||||
|
||||
#define SLEEP_CYCLE_LENGTH 100l
|
||||
|
||||
namespace fs = std::experimental::filesystem;
|
||||
namespace fs = rocprofiler::common::filesystem;
|
||||
|
||||
// Macro to check ROCProfiler calls status
|
||||
#define CHECK_ROCPROFILER(call) \
|
||||
@@ -439,7 +439,7 @@ void plugins_load(void* userdata) {
|
||||
|
||||
if (out_path.size() && !bIsATT) {
|
||||
try {
|
||||
std::experimental::filesystem::create_directories(out_path);
|
||||
rocprofiler::common::filesystem::create_directories(out_path);
|
||||
} catch (...) {
|
||||
}
|
||||
out_path = out_path + '/';
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
// MIT License
|
||||
//
|
||||
// Copyright (c) 2023 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#pragma once
|
||||
|
||||
#if defined(__cpp_lib_filesystem)
|
||||
#define ROCPROFILER_HAS_CPP_LIB_FILESYSTEM 1
|
||||
#else
|
||||
#if defined __has_include
|
||||
#if __has_include(<filesystem>)
|
||||
#define ROCPROFILER_HAS_CPP_LIB_FILESYSTEM 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// include the correct filesystem header
|
||||
#if defined(ROCPROFILER_HAS_CPP_LIB_FILESYSTEM) && ROCPROFILER_HAS_CPP_LIB_FILESYSTEM > 0
|
||||
#include <filesystem>
|
||||
#else
|
||||
#include <experimental/filesystem>
|
||||
#endif
|
||||
|
||||
// create a namespace alias
|
||||
namespace rocprofiler {
|
||||
namespace common {
|
||||
#if defined(ROCPROFILER_HAS_CPP_LIB_FILESYSTEM) && ROCPROFILER_HAS_CPP_LIB_FILESYSTEM > 0
|
||||
namespace filesystem = ::std::filesystem; // NOLINT
|
||||
#else
|
||||
namespace filesystem = ::std::experimental::filesystem; // NOLINT
|
||||
#endif
|
||||
} // namespace common
|
||||
} // namespace rocprofiler
|
||||
Ссылка в новой задаче
Block a user