dart-sdk/runtime/bin/exe_utils.h
Ben Konyi dc9f500960 Reland "[ VM / DartDev ] Fixed issue where trying to find the directory of the Dart executable would fail if we encountered a relative symlink while trying to determine the absolute path."
This reland contains fixes related to: https://github.com/dart-lang/sdk/issues/41329

This reverts commit 05e43cff92.

Fixes: https://github.com/dart-lang/sdk/issues/41329
Change-Id: I1abef994cf6ffbac7e5c6bddd6de15f4f53535ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142440
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-04-13 21:11:52 +00:00

31 lines
745 B
C++

// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef RUNTIME_BIN_EXE_UTILS_H_
#define RUNTIME_BIN_EXE_UTILS_H_
#include <stdlib.h>
#include <string.h>
#include "include/dart_api.h"
#include "platform/globals.h"
#include "platform/utils.h"
namespace dart {
namespace bin {
class EXEUtils {
public:
// Returns the path to the directory the current executable resides in.
static Utils::CStringUniquePtr GetDirectoryPrefixFromExeName();
private:
DISALLOW_COPY_AND_ASSIGN(EXEUtils);
};
} // namespace bin
} // namespace dart
#endif // RUNTIME_BIN_EXE_UTILS_H_