summaryrefslogtreecommitdiff
path: root/src/support/path.h
Commit message (Collapse)AuthorAgeFilesLines
* Encode command line to UTF8 on Windows (#5671)Derek Schuff2023-09-141-0/+14
| | | | | | | | | | | | | | | | This PR changes how file paths and the command line are handled. On startup on Windows, we process the wstring version of the command line (including the file paths) and re-encode it to UTF8 before handing it off to the rest of the command line handling logic. This means that all paths are stored in UTF8-encoded std::strings as they go through the program, right up until they are used to open files. At that time, they are converted to the appropriate native format with the new to_path function before passing to the stdlib open functions. This has the advantage that all of the non-file-opening code can use a single type to hold paths (which is good since std::filesystem::path has proved problematic in some cases), but has the disadvantage that someone could add new code that forgets to convert to_path before opening. That's somewhat mitigated by the fact that most of the code uses the ModuleIOBase classes for opening files. Fixes #4995
* Modernize code to C++17 (#3104)Max Graey2021-11-221-6/+2
|
* Fix autoreducing when not in the binaryen directory (#2390)Alon Zakai2019-10-171-3/+5
| | | | This uses argv[0] as the default way to find the location of the wasm binaries (wasm-reduce needs to call wasm-opt).
* refactor Path utils: store the bin/ dir so that all users of the API can use ↵Alon Zakai2018-03-301-24/+13
| | | | it by the standard calls, even if it was modified by user input (move it out of just being in wasm-reduce.cpp) (#1489)
* Support wasm-reduce for Windows (#1488)Michael Ferris2018-03-261-3/+5
|
* Fix wasm-reduce testing out of tree (#1284)Alon Zakai2017-11-211-0/+58
* fix wasm-reduce when out-of-tree: do not use a hardcoded bin/wasm-opt, instead add a Path namespace with utilities to get the proper path, and use BINARYEN_ROOT which our test setup code ensures