diff options
Diffstat (limited to 'dexlayout/dexlayout_main.cc')
| -rw-r--r-- | dexlayout/dexlayout_main.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dexlayout/dexlayout_main.cc b/dexlayout/dexlayout_main.cc index 41b60da133..2163f89bdf 100644 --- a/dexlayout/dexlayout_main.cc +++ b/dexlayout/dexlayout_main.cc @@ -190,7 +190,12 @@ int DexlayoutDriver(int argc, char** argv) { // Open profile file. std::unique_ptr<ProfileCompilationInfo> profile_info; if (options.profile_file_name_) { - int profile_fd = open(options.profile_file_name_, O_RDONLY | O_CLOEXEC); +#ifdef _WIN32 + int flags = O_RDONLY; +#else + int flags = O_RDONLY | O_CLOEXEC; +#endif + int profile_fd = open(options.profile_file_name_, flags); if (profile_fd < 0) { PLOG(ERROR) << "Can't open " << options.profile_file_name_; return 1; @@ -201,6 +206,7 @@ int DexlayoutDriver(int argc, char** argv) { return 1; } } + PLOG(INFO) << "After opening profile file"; // Create DexLayout instance. DexLayout dex_layout(options, profile_info.get(), out_file, /*header=*/ nullptr); |