Skip to content

Commit 10312f0

Browse files
authored
fix: fortran object compilation path should include directories (#192)
By using the entire path, we deconflict files with the same name under different directories in the same Bazel package.
1 parent 6a10006 commit 10312f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rules_fortran/defs.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ def _compile(
293293
struct(
294294
source_file = source_file,
295295
output_file = actions.declare_file(
296-
paths.replace_extension(source_file.basename, ".o"),
296+
paths.replace_extension(source_file.path, ".o"),
297297
),
298298
module_files = [
299299
actions.declare_file(module_file)
@@ -306,7 +306,7 @@ def _compile(
306306
] + [
307307
struct(
308308
source_file = source_file,
309-
output_file = actions.declare_file(paths.replace_extension(source_file.basename, ".o")),
309+
output_file = actions.declare_file(paths.replace_extension(source_file.path, ".o")),
310310
module_files = [],
311311
)
312312
for source_file in srcs_files

0 commit comments

Comments
 (0)