| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
`src/tools/singlejar/mapped_file_*.inc` are now included in `src/tools/singlejar/mapped_file.cc` instead of header file and no longer inline most member functions: these functions are too large for inlining.
/cc @laszlocsomor
Closes #5780.
PiperOrigin-RevId: 207998444
|
|
|
|
|
|
|
|
|
|
| |
Side-note: `options_test`, `zip_headers_test` and `zlib_interface_test` now pass on Windows.
/cc @laszlocsomor
Closes #5781.
PiperOrigin-RevId: 207699280
|
|
|
|
|
|
|
|
| |
/cc @laszlocsomor
Closes #5779.
PiperOrigin-RevId: 207693540
|
|
|
|
| |
PiperOrigin-RevId: 206960449
|
|
|
|
|
|
|
|
| |
/cc @laszlocsomor
Closes #5655.
PiperOrigin-RevId: 206319221
|
|
|
|
|
|
|
|
|
|
| |
Make these tests run on Windows, but currently does not pass.
/cc @laszlocsomor
Closes #5652.
PiperOrigin-RevId: 205658932
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSVC does not have `ssize_t` type. MSVC does have `off_t`, but is defined as 32-bit `long` due to legacy reason, this will prevent us from handling large file.
Changing `off_t` and `ssize_t` to C standard `ptrdiff_t` for portability and consistency.
Changing one instance of `S_ISDIR(st.st_mode)` to `(st.st_mode & S_IFDIR) == S_IFDIR` as MSVC does not have `S_ISDIR` macro.
/cc @laszlocsomor
Closes #5538.
PiperOrigin-RevId: 205038203
|
|
|
|
|
|
|
|
|
|
|
|
| |
A small `port` library with various MSVC hacks. This is needed for future PRs.
For non-Windows platforms, `port.cc` will produce an empty object file.
#2241 /cc @laszlocsomor
Closes #5501.
PiperOrigin-RevId: 204889516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- MSVC does not have `errx` functions, so use `diag_errx` etc. instead.
- Fix format when trying to print `size_t`, use `%zu` so that the function will handle 32/64-bit `size_t` according to target system automatically.
- Adding/guarding a few includes for MSVC.
- MSVC does not have `ssize_t`, so replace it with `ptrdiff_t`
#2241
/cc @laszlocsomor
Closes #5499.
PiperOrigin-RevId: 204074420
|
|
|
|
|
|
|
|
|
|
|
|
| |
`setbuffer` is not available on MSVC, use C-standard `setvbuf` from `stdio.h` instead.
`setbuffer` was introduced in https://github.com/bazelbuild/bazel/commit/b4cf5e32a94024c1bfdc6ca432677c31306a3fb5.
#2241 /cc @laszlocsomor
Closes #5500.
PiperOrigin-RevId: 203083781
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 202644613
|
|
|
|
|
|
|
| |
As //tools/defaults will be deprecated soon. All usages of //tools/defaults:jdk and //tools/defaults:java_toolchain should be replaced by corresponding targets in //tools/jdk/BUILD package
RELNOTES:none
PiperOrigin-RevId: 202114489
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert most `COMPILER_MSVC` to `_WIN32` (as they apply to Windows platform, not MSVC compiler). Only `src/tools/singlejar/zip_headers.h` and `src/main/cpp/util/md5.h` actually need `_MSC_VER`.
`COMPILER_MSVC` in `third_party/protobuf` are not removed. They can be fixed by updating dependency to newer version.
/cc @meteorcloudy
Closes #5350.
Change-Id: Ibc131abfaf34a0cb2bd338549983ea9d28eaabfe
PiperOrigin-RevId: 200019793
|
|
|
|
|
|
|
|
|
|
|
| |
Leave functions that make file accesses in the file library, and general blaze utilities in the blaze_util file, but move the functions that boil down to string manipulation and path formatting to their own file. (With the exception of getCWD, since absolute path syntax is relevant here.)
Doing this largely to consolidate all Windows path control into a single place, so that it's easier to notice inconsistencies. For instance, ConvertPath currently makes Windows paths absolute, but not Posix paths, and MakeAbsolute relies on this behavior. In addition, JoinPath assumes Posix path syntax, which leads to some odd looking paths. These will be fixed in a followup change.
(Found these issues while working on #4502, trying to fix the windows-specific system bazelrc.)
RELNOTES: None.
PiperOrigin-RevId: 199368226
|
|
|
|
| |
PiperOrigin-RevId: 190999682
|
|
|
|
|
|
|
|
| |
This was preventing ijar and singlejar from building when included in
@bazel_tools in our repo.
Change-Id: I1553e4f3615965cb997579e7d277fb2a08f9b91b
PiperOrigin-RevId: 190840090
|
|
|
|
|
|
|
|
| |
j$.** files.
RELNOTES: None.
PiperOrigin-RevId: 190667956
|
|
|
|
|
|
|
| |
third_party/gtest can go away after this.
RELNOTES: None.
PiperOrigin-RevId: 190221581
|
|
|
|
| |
PiperOrigin-RevId: 188459395
|
|
|
|
|
|
|
|
|
|
| |
We can now compile
//src/tools/singlejar:token_stream on Windows.
See https://github.com/bazelbuild/bazel/issues/2241
Change-Id: I98f86e608e5ebaf685e4de26b2dabe75fcca78d2
PiperOrigin-RevId: 185655986
|
|
|
|
|
|
|
|
| |
returned by the previous calls of the same method. Keep each such address in a
separate scope.
RELNOTES: Crash in OutputJar::Close has been fixed
PiperOrigin-RevId: 182286718
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.Deleted config_setting for --cpu=x64_windows_msys, because we don't build
Bazel with MSYS gcc anymore.
2.Deleted config_setting for --cpu=x64_windows_msvc, because it uses exactly
the same toolchain as --cpu=x64_windows, it'll be removed in the future.
This change reduces the complexity of our BUILD files and make them less
confusing.
Change-Id: I939831a6861413b0f745fb1be98aacd4fb780e0a
PiperOrigin-RevId: 181751853
|
|
|
|
|
|
|
|
|
|
|
| |
Merge reference.conf files in single jar since [akka will break](https://doc.akka.io/docs/akka/current/general/configuration.html#when-using-jarjar-onejar-assembly-or-any-jar-bundler) if reference.conf files are overwritten.
The feature is added to both java and cpp implementations of singlejar to concatenate reference.conf files to keep behaviors consistent. For the cpp implementation, using `OutputJar.ExtraCombiner` in singlejar_main.cc feels less intrusive than adding a new `Concatenator` in the output_jar code.
Bazel-dev discussion on the issue is [here](https://groups.google.com/forum/#!topic/bazel-dev/C30dwAPL708).
Closes #4413.
PiperOrigin-RevId: 181622277
|
|
|
|
|
|
|
| |
This will enable an easier transition from checked-in BUILD files to ones generated by copybara.
RELNOTES: None
PiperOrigin-RevId: 177514519
|
|
|
|
|
|
|
| |
each entry in the --outputs flag.
RELNOTES: n/a
PiperOrigin-RevId: 173547248
|
|
|
|
|
|
|
| |
This should also address https://github.com/bazelbuild/bazel/issues/3903
RELNOTES: None.
PiperOrigin-RevId: 172963663
|
|
|
|
|
|
|
|
| |
method desugaring for Android.
RELNOTES: none
PiperOrigin-RevId: 171891682
|
|
|
|
| |
PiperOrigin-RevId: 164436730
|
|
|
|
|
|
|
|
|
|
|
| |
cinttypes is the C++ header that should replace stdint.h. Not
using the correct header was leading to compilation error on CentOS 6.7
Fixes #3455.
To be cherry-picked for #3375.
Change-Id: I6df22134a4a4902ec9fa7ecdfaeb5408eacf3564
PiperOrigin-RevId: 163334651
|
|
|
|
|
|
|
|
|
|
|
|
| |
while (total_written < count) {
~~~~~~~~~~~~~~^~~~~~~
Most of these can be fixed by simply by storing the return value of
various functions in the right variable type. E.g., cen_offset32 can
naturally be stored in uin32_t rather than uint64_t.
Change-Id: I9f188ca541e4fe2587c636670807f56887e1655e
PiperOrigin-RevId: 160897953
|
|
|
|
|
|
|
|
|
|
| |
Please refer to patch set 9 and its CI run for usage and test
results. In practice, users should create their own java_toolchain
rule in their project's BUILD file, and set the two attributes like
above instead of modifying //tools/jdk/BUILD.
Change-Id: Ic880f243086b00a58d453a8139ba4c957fe54bc7
PiperOrigin-RevId: 159694649
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C implementation of singlejar verifies that it is built for a
supported system; currently those are 64-bit linux and apple systems.
However, the code is portable enough that it can easily be adapted to
run on 64-bit FreeBSD systems as well. In fact, only the path of a
single header file is different, and we need to link with -lm.
Fixes #3096.
Change-Id: Id69542ad940f1161aceb55eb8f5dabda2f486747
PiperOrigin-RevId: 158533955
|
|
|
|
|
|
|
| |
Build on CentOS was failing because of missing macros, see http://ci.bazel.io/job/bazel-docker-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=docker/557/console.
Change-Id: I1b7b2ef2b1f26d4dac5439f4fcd01e2ef6553dcf
PiperOrigin-RevId: 155365288
|
|
|
|
|
|
|
|
| |
Previously running singlejar over the same flags.xml multiple
times would add start/end tags each time, resulting in repeated
top-level tags.
PiperOrigin-RevId: 154126431
|
|
|
|
| |
PiperOrigin-RevId: 153787279
|
|
|
|
|
|
|
|
|
| |
This makes singlejar's handling of resources consistent with JavaBuilder,
and allows the JavaBuilder resource handling to be replaced by a singlejar
action that adds resources to library jars separately from compilation
(see unknown commit).
PiperOrigin-RevId: 152082884
|
|
|
|
|
|
|
|
| |
See https://github.com/bazelbuild/bazel/issues/2107
--
PiperOrigin-RevId: 149626394
MOS_MIGRATED_REVID=149626394
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a platform-specific file handle type
(HANDLE on Windows, int on Linux/Darwin/FreeBSD)
so we can get rid of the read_func and write_func
functions, since they are always the same
everywhere.
Also include file_platform.h in file.h, since they
are logically the same file (file_platform.h is
just the platform-specific part of file.h).
--
PiperOrigin-RevId: 148892736
MOS_MIGRATED_REVID=148892736
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 147449557
MOS_MIGRATED_REVID=147449557
|
|
|
|
|
|
|
|
| |
RELNOTES: singlejar can now create jar files larger than 4GB.
--
PiperOrigin-RevId: 143588105
MOS_MIGRATED_REVID=143588105
|
|
|
|
|
|
|
|
|
| |
Closes #2139.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/2139
PiperOrigin-RevId: 142570236
MOS_MIGRATED_REVID=142570236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we can remove the dependency on blaze_util (which is Bazel's
client specific) from singlejar.
This work was made possible by commit 49970e0136d0: ("Bazel client:
platform-specific {Read,Write}File").
--
Change-Id: I6e95fb9119a271e4d48cbe2eefc1d5354ee188aa
Reviewed-on: https://cr.bazel.build/7650
PiperOrigin-RevId: 141294165
MOS_MIGRATED_REVID=141294165
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 141145286
MOS_MIGRATED_REVID=141145286
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 141116980
MOS_MIGRATED_REVID=141116980
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140380336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move blaze::ReadFile and blaze::WriteFile to
file.h and file_platform.h (thus into the
blaze_util namespace), and update references.
This allows us to implement these methods in a
platform-specific way.
Also move UnlinkPath.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140328273
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can now compile blaze_util_windows.cc with
MSVC, yay! (when building //src:bazel
--cpu=x64_windows_msvc -k).
There are a lot of #ifdef's and TODOs so this
is a modest victory for now.
In this change:
- change blaze::MakeDirectories to return bool
instead of int, since that's how it was used
anyway, and to expect the permission mask as
unsigned int instead of mode_t, since the
former is good enough and compatible with
mode_t on POSIX while mode_t is not defined on
Windows
- move blaze::MakeDirectories into
blaze_util_<platform>
- implement envvar-handling in
blaze_util_<platform> and use it everywhere
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=139887503
|
|
|
|
|
|
|
| |
that's OK)
--
MOS_MIGRATED_REVID=139774407
|
|
|
|
|
|
|
| |
The planned replacement of the ApkBuilder with singlejar uses it.
--
MOS_MIGRATED_REVID=134290339
|
|
|
|
|
|
|
| |
META-INF/). Unix 'file' utility uses it to distinguish jar file from zip file.
--
MOS_MIGRATED_REVID=134102453
|