Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions osmodel.mak
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# This Makefile snippet detects the OS and the architecture MODEL
# Keep this file in sync between druntime, phobos, and dmd repositories!
# osmodel.mak
#
# Detects and sets the macros:
#
# OS = one of {osx,linux,freebsd,openbsd,netbsd,solaris}
# MODEL = one of { 32, 64 }
# MODEL_FLAG = one of { -m32, -m64 }
#
# Note:
# Keep this file in sync between druntime, phobos, and dmd repositories!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this needs accompanying PRs to dmd and phobos as per the comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but after this one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this needs accompanying PRs to dmd and phobos as per the comment.

FWIW Phobos and Druntime already depend on DMD and I see no logical reason to have redundant copies of this files...
I actually tried to push for this once:

dlang/phobos#5228

But was stopped by people not wanting to have the DMD Makefile auto-checking out the tools repo.
However, we could go with the small scale solution and at least get rid of the osmodel files at Phobos, Druntime ...
Dlang.org was controversial as well due to automatic git clone

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a way to fix this from the github side - is it possible to link a file across projects?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a way to fix this from the github side - is it possible to link a file across projects?

Yes, it's called submodules, and they come with their share of problems. (You need to remember to do git submodule update any time you move HEAD.)

# Source: https://github.com/dlang/druntime/blob/master/osmodel.mak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the purpose of this source link.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have them in all the dmd source code files - it's for the same reason - an easy way to find out things like the history of the file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git log osmodel.mak, no?



ifeq (,$(OS))
uname_S:=$(shell uname -s)
Expand Down